AFTD Auto-Formalizing Theoretical Domains

instDecidableEqSigmaBoolCond_physlib

instanceimported Lean

The type family parameterized by Bool has decidable equality if each type variant is decidable.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open scoped InnerProductSpace in
open Module in
instance instDecidableEqSigmaBoolCond_physlib [DecidableEq m] [DecidableEq n] : DecidableEq (Σ b, cond b m n)
  | ⟨true, _⟩, ⟨false, _⟩
Defined in
Physlib, `instDecidableEqSigmaBoolCond_physlib`
Lean proof
By Gordon Hsu, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Gordon Hsu. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
09 Oct 2026
Axioms
none listed
Used by 1

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open scoped InnerProductSpace in
open Module in
/-- The type family parameterized by `Bool` has decidable equality if each type variant is decidable. -/
instance instDecidableEqSigmaBoolCond_physlib [DecidableEq m] [DecidableEq n] : DecidableEq (Σ b, cond b m n)
  | ⟨true, _⟩, ⟨false, _⟩
  | ⟨false, _⟩, ⟨true, _⟩ => isFalse nofun
  | ⟨false, i⟩, ⟨false, j⟩
  | ⟨true, i⟩, ⟨true, j⟩ =>
    if h : i = j then isTrue (Sigma.eq rfl h) else isFalse fun | rfl => h rfl
See it in the graphDiscuss this resultChallenge it