File: Mathlib/Init/Logic.lean

full_name: not_of_eq_false
code: theorem not_of_eq_false {p : Prop} (h : p = False) : ¬p 
goal: ¬p

full_name: cast_proof_irrel
code: theorem cast_proof_irrel {β : Sort u} (h₁ h₂ : α = β) (a : α) : cast h₁ a = cast h₂ a 
goal: cast h₁ a = cast h₂ a

full_name: heq_of_eq_rec_left
code: theorem heq_of_eq_rec_left {φ : α → Sort v} {a a' : α} {p₁ : φ a} {p₂ : φ a'} :
    (e : a = a') → (h₂ : Eq.rec (motive := fun a _ ↦ φ a) p₁ e = p₂) → HEq p₁ p₂
  
goal: HEq p₁ p₂

full_name: heq_of_eq_rec_right
code: theorem heq_of_eq_rec_right {φ : α → Sort v} {a a' : α} {p₁ : φ a} {p₂ : φ a'} :
    (e : a' = a) → (h₂ : p₁ = Eq.rec (motive := fun a _ ↦ φ a) p₂ e) → HEq p₁ p₂
  
goal: HEq p₁ p₂

full_name: of_heq_true
code: theorem of_heq_true {a : Prop} (h : HEq a True) : a 
goal: a

full_name: eq_rec_compose
code: theorem eq_rec_compose {α β φ : Sort u} :
    ∀ (p₁ : β = φ) (p₂ : α = β) (a : α),
      (Eq.recOn p₁ (Eq.recOn p₂ a : β) : φ) = Eq.recOn (Eq.trans p₂ p₁) a
  
goal: Eq.recOn p₁ (Eq.recOn p₂ a) = Eq.recOn ⋯ a

full_name: heq_prop
code: theorem heq_prop {P Q : Prop} (p : P) (q : Q) : HEq p q 
goal: HEq p q

full_name: Xor'
code: def Xor' (a b : Prop) 
goal: Prop

full_name: instTransIff_mathlib
code: instance : Trans Iff Iff Iff 
goal: Trans Iff Iff Iff

full_name: and_true_iff
code: theorem and_true_iff : p ∧ True ↔ p 
goal: p ∧ True ↔ p

full_name: true_and_iff
code: theorem true_and_iff : True ∧ p ↔ p 
goal: True ∧ p ↔ p

full_name: and_false_iff
code: theorem and_false_iff : p ∧ False ↔ False 
goal: p ∧ False ↔ False

full_name: false_and_iff
code: theorem false_and_iff : False ∧ p ↔ False 
goal: False ∧ p ↔ False

full_name: true_or_iff
code: theorem true_or_iff : True ∨ p ↔ True 
goal: True ∨ p ↔ True

full_name: or_true_iff
code: theorem or_true_iff : p ∨ True ↔ True 
goal: p ∨ True ↔ True

full_name: false_or_iff
code: theorem false_or_iff : False ∨ p ↔ p 
goal: False ∨ p ↔ p

full_name: or_false_iff
code: theorem or_false_iff : p ∨ False ↔ p 
goal: p ∨ False ↔ p

full_name: not_or_of_not
code: theorem not_or_of_not : ¬a → ¬b → ¬(a ∨ b) 
goal: ¬a → ¬b → ¬(a ∨ b)

full_name: iff_true_iff
code: theorem iff_true_iff : (a ↔ True) ↔ a 
goal: (a ↔ True) ↔ a

full_name: true_iff_iff
code: theorem true_iff_iff : (True ↔ a) ↔ a 
goal: (True ↔ a) ↔ a

full_name: iff_false_iff
code: theorem iff_false_iff : (a ↔ False) ↔ ¬a 
goal: (a ↔ False) ↔ ¬a

full_name: false_iff_iff
code: theorem false_iff_iff : (False ↔ a) ↔ ¬a 
goal: (False ↔ a) ↔ ¬a

full_name: iff_self_iff
code: theorem iff_self_iff (a : Prop) : (a ↔ a) ↔ True 
goal: (a ↔ a) ↔ True

full_name: ExistsUnique
code: def ExistsUnique (p : α → Prop) 
goal: Prop

full_name: Mathlib.Notation.isExplicitBinderSingular
code: /--
Checks to see that `xs` has only one binder.
-/
def isExplicitBinderSingular (xs : TSyntax ``explicitBinders) : Bool 
goal: Bool

full_name: Mathlib.Notation.«_aux_Mathlib_Init_Logic___macroRules_Mathlib_Notation_term∃!_,__1»
code: macro "∃!" xs:explicitBinders ", " b:term : term => do
  if !isExplicitBinderSingular xs then
    Macro.throwErrorAt xs "\
      The `ExistsUnique` notation should not be used with more than one binder.\n\
      \n\
      The reason for this is that `∃! (x : α), ∃! (y : β), p x y` has a completely different \
      meaning from `∃! q : α × β, p q.1 q.2`. \
      To prevent confusion, this notation requires that you be explicit \
      and use one with the correct interpretation."
  expandExplicitBinders ``ExistsUnique xs b
goal: Lean.Macro

full_name: Mathlib.Notation.«term∃!_,_»
code: macro "∃!" xs:explicitBinders ", " b:term : term => do
  if !isExplicitBinderSingular xs then
    Macro.throwErrorAt xs "\
      The `ExistsUnique` notation should not be used with more than one binder.\n\
      \n\
      The reason for this is that `∃! (x : α), ∃! (y : β), p x y` has a completely different \
      meaning from `∃! q : α × β, p q.1 q.2`. \
      To prevent confusion, this notation requires that you be explicit \
      and use one with the correct interpretation."
  expandExplicitBinders ``ExistsUnique xs b
goal: Lean.ParserDescr

full_name: Mathlib.Notation.unexpandExistsUnique
code: /--
Pretty-printing for `ExistsUnique`, following the same pattern as pretty printing for `Exists`.
However, it does *not* merge binders.
-/
@[app_unexpander ExistsUnique] def unexpandExistsUnique : Lean.PrettyPrinter.Unexpander
  
goal: Lean.PrettyPrinter.Unexpander

full_name: Mathlib.Notation.«term∃!__,_»
code: /--
`∃! x ∈ s, p x` means `∃! x, x ∈ s ∧ p x`, which is to say that there exists a unique `x ∈ s`
such that `p x`.
Similarly, notations such as `∃! x ≤ n, p n` are supported,
using any relation defined using the `binder_predicate` command.
-/
syntax "∃! " binderIdent binderPred ", " term : term
goal: Lean.ParserDescr

full_name: Mathlib.Notation.«_aux_Mathlib_Init_Logic___macroRules_Mathlib_Notation_term∃!__,__1»
code: macro_rules
  | `(∃! $x:ident $p:binderPred, $b) => `(∃! $x:ident, satisfies_binder_pred% $x $p ∧ $b)
  | `(∃! _ $p:binderPred, $b) => `(∃! x, satisfies_binder_pred% x $p ∧ $b)
goal: Lean.Macro

full_name: ExistsUnique.intro
code: theorem ExistsUnique.intro {p : α → Prop} (w : α)
    (h₁ : p w) (h₂ : ∀ y, p y → y = w) : ∃! x, p x 
goal: ∃! x, p x

full_name: ExistsUnique.elim
code: theorem ExistsUnique.elim {α : Sort u} {p : α → Prop} {b : Prop}
    (h₂ : ∃! x, p x) (h₁ : ∀ x, p x → (∀ y, p y → y = x) → b) : b 
goal: b

full_name: exists_unique_of_exists_of_unique
code: theorem exists_unique_of_exists_of_unique {α : Sort u} {p : α → Prop}
    (hex : ∃ x, p x) (hunique : ∀ y₁ y₂, p y₁ → p y₂ → y₁ = y₂) : ∃! x, p x 
goal: ∃! x, p x

full_name: ExistsUnique.exists
code: theorem ExistsUnique.exists {p : α → Prop} : (∃! x, p x) → ∃ x, p x 
goal: (∃! x, p x) → ∃ x, p x

full_name: ExistsUnique.unique
code: theorem ExistsUnique.unique {α : Sort u} {p : α → Prop}
    (h : ∃! x, p x) {y₁ y₂ : α} (py₁ : p y₁) (py₂ : p y₂) : y₁ = y₂ 
goal: y₁ = y₂

full_name: existsUnique_congr
code: theorem existsUnique_congr {p q : α → Prop} (h : ∀ a, p a ↔ q a) : (∃! a, p a) ↔ ∃! a, q a 
goal: (∃! a, p a) ↔ ∃! a, q a

full_name: decide_True'
code: theorem decide_True' (h : Decidable True) : decide True = true 
goal: decide True = true

full_name: decide_False'
code: theorem decide_False' (h : Decidable False) : decide False = false 
goal: decide False = false

full_name: Decidable.recOn_true
code: def recOn_true [h : Decidable p] {h₁ : p → Sort u} {h₂ : ¬p → Sort u}
    (h₃ : p) (h₄ : h₁ h₃) : Decidable.recOn h h₂ h₁ 
goal: Decidable.recOn h h₂ h₁

full_name: Decidable.recOn_false
code: def recOn_false [h : Decidable p] {h₁ : p → Sort u} {h₂ : ¬p → Sort u} (h₃ : ¬p) (h₄ : h₂ h₃) :
    Decidable.recOn h h₂ h₁ 
goal: Decidable.recOn h h₂ h₁

full_name: instDecidableXor'
code: instance {q : Prop} [Decidable p] [Decidable q] : Decidable (Xor' p q) 
goal: Decidable (Xor' p q)

full_name: IsDecEq
code: def IsDecEq {α : Sort u} (p : α → α → Bool) : Prop 
goal: Prop

full_name: IsDecRefl
code: def IsDecRefl {α : Sort u} (p : α → α → Bool) : Prop 
goal: Prop

full_name: decidableEq_of_bool_pred
code: def decidableEq_of_bool_pred {α : Sort u} {p : α → α → Bool} (h₁ : IsDecEq p)
    (h₂ : IsDecRefl p) : DecidableEq α
  
goal: DecidableEq α

full_name: decidableEq_inl_refl
code: theorem decidableEq_inl_refl {α : Sort u} [h : DecidableEq α] (a : α) :
    h a a = isTrue (Eq.refl a) 
goal: h a a = isTrue ⋯

full_name: decidableEq_inr_neg
code: theorem decidableEq_inr_neg {α : Sort u} [h : DecidableEq α] {a b : α}
    (n : a ≠ b) : h a b = isFalse n 
goal: h a b = isFalse n

full_name: rec_subsingleton
code: theorem rec_subsingleton {p : Prop} [h : Decidable p] {h₁ : p → Sort u} {h₂ : ¬p → Sort u}
    [h₃ : ∀ h : p, Subsingleton (h₁ h)] [h₄ : ∀ h : ¬p, Subsingleton (h₂ h)] :
    Subsingleton (Decidable.recOn h h₂ h₁) 
goal: Subsingleton (Decidable.recOn h h₂ h₁)

full_name: imp_of_if_pos
code: theorem imp_of_if_pos {c t e : Prop} [Decidable c] (h : ite c t e) (hc : c) : t 
goal: t

full_name: imp_of_if_neg
code: theorem imp_of_if_neg {c t e : Prop} [Decidable c] (h : ite c t e) (hnc : ¬c) : e 
goal: e

full_name: if_ctx_congr
code: theorem if_ctx_congr {α : Sort u} {b c : Prop} [dec_b : Decidable b] [dec_c : Decidable c]
    {x y u v : α} (h_c : b ↔ c) (h_t : c → x = u) (h_e : ¬c → y = v) : ite b x y = ite c u v 
goal: (if b then x else y) = if c then u else v

full_name: if_congr
code: theorem if_congr {α : Sort u} {b c : Prop} [Decidable b] [Decidable c]
    {x y u v : α} (h_c : b ↔ c) (h_t : x = u) (h_e : y = v) : ite b x y = ite c u v 
goal: (if b then x else y) = if c then u else v

full_name: if_ctx_congr_prop
code: theorem if_ctx_congr_prop {b c x y u v : Prop} [dec_b : Decidable b] [dec_c : Decidable c]
    (h_c : b ↔ c) (h_t : c → (x ↔ u)) (h_e : ¬c → (y ↔ v)) : ite b x y ↔ ite c u v 
goal: (if b then x else y) ↔ if c then u else v

full_name: if_congr_prop
code: theorem if_congr_prop {b c x y u v : Prop} [Decidable b] [Decidable c] (h_c : b ↔ c) (h_t : x ↔ u)
    (h_e : y ↔ v) : ite b x y ↔ ite c u v 
goal: (if b then x else y) ↔ if c then u else v

full_name: if_ctx_simp_congr_prop
code: theorem if_ctx_simp_congr_prop {b c x y u v : Prop} [Decidable b] (h_c : b ↔ c) (h_t : c → (x ↔ u))
    -- FIXME: after https://github.com/leanprover/lean4/issues/1867 is fixed,
    -- this should be changed back to:
    -- (h_e : ¬c → (y ↔ v)) : ite b x y ↔ ite c (h := decidable_of_decidable_of_iff h_c) u v :=
    (h_e : ¬c → (y ↔ v)) : ite b x y ↔ @ite _ c (decidable_of_decidable_of_iff h_c) u v 
goal: (if b then x else y) ↔ if c then u else v

full_name: if_simp_congr_prop
code: theorem if_simp_congr_prop {b c x y u v : Prop} [Decidable b] (h_c : b ↔ c) (h_t : x ↔ u)
    -- FIXME: after https://github.com/leanprover/lean4/issues/1867 is fixed,
    -- this should be changed back to:
    -- (h_e : y ↔ v) : ite b x y ↔ (ite c (h := decidable_of_decidable_of_iff h_c) u v) :=
    (h_e : y ↔ v) : ite b x y ↔ (@ite _ c (decidable_of_decidable_of_iff h_c) u v) 
goal: (if b then x else y) ↔ if c then u else v

full_name: dif_ctx_congr
code: theorem dif_ctx_congr {α : Sort u} {b c : Prop} [dec_b : Decidable b] [dec_c : Decidable c]
    {x : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α}
    (h_c : b ↔ c) (h_t : ∀ h : c, x (Iff.mpr h_c h) = u h)
    (h_e : ∀ h : ¬c, y (Iff.mpr (not_congr h_c) h) = v h) :
    @dite α b dec_b x y = @dite α c dec_c u v 
goal: dite b x y = dite c u v

full_name: dif_ctx_simp_congr
code: theorem dif_ctx_simp_congr {α : Sort u} {b c : Prop} [Decidable b]
    {x : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α}
    (h_c : b ↔ c) (h_t : ∀ h : c, x (Iff.mpr h_c h) = u h)
    (h_e : ∀ h : ¬c, y (Iff.mpr (not_congr h_c) h) = v h) :
    -- FIXME: after https://github.com/leanprover/lean4/issues/1867 is fixed,
    -- this should be changed back to:
    -- dite b x y = dite c (h := decidable_of_decidable_of_iff h_c) u v :=
    dite b x y = @dite _ c (decidable_of_decidable_of_iff h_c) u v 
goal: dite b x y = dite c u v

full_name: AsTrue
code: def AsTrue (c : Prop) [Decidable c] : Prop 
goal: Prop

full_name: AsFalse
code: def AsFalse (c : Prop) [Decidable c] : Prop 
goal: Prop

full_name: AsTrue.get
code: theorem AsTrue.get {c : Prop} [h₁ : Decidable c] (_ : AsTrue c) : c 
goal: AsTrue c → c

full_name: let_value_eq
code: theorem let_value_eq {α : Sort u} {β : Sort v} {a₁ a₂ : α} (b : α → β)
    (h : a₁ = a₂) : (let x : α := a₁; b x) = (let x : α := a₂; b x) 
goal: (let x := a₁;
  b x) =
  let x := a₂;
  b x

full_name: let_value_heq
code: theorem let_value_heq {α : Sort v} {β : α → Sort u} {a₁ a₂ : α} (b : ∀ x : α, β x)
    (h : a₁ = a₂) : HEq (let x : α := a₁; b x) (let x : α := a₂; b x) 
goal: HEq
  (let x := a₁;
  b x)
  (let x := a₂;
  b x)

full_name: let_body_eq
code: theorem let_body_eq {α : Sort v} {β : α → Sort u} (a : α) {b₁ b₂ : ∀ x : α, β x}
    (h : ∀ x, b₁ x = b₂ x) : (let x : α := a; b₁ x) = (let x : α := a; b₂ x) 
goal: (let x := a;
  b₁ x) =
  let x := a;
  b₂ x

full_name: let_eq
code: theorem let_eq {α : Sort v} {β : Sort u} {a₁ a₂ : α} {b₁ b₂ : α → β}
    (h₁ : a₁ = a₂) (h₂ : ∀ x, b₁ x = b₂ x) :
    (let x : α := a₁; b₁ x) = (let x : α := a₂; b₂ x) 
goal: (let x := a₁;
  b₁ x) =
  let x := a₂;
  b₂ x

full_name: «_aux_Mathlib_Init_Logic___macroRules_term_≺__1»
code: /-- Local notation for an arbitrary binary relation `r`. -/
local infix:50 " ≺ " => r
goal: Lean.Macro

full_name: Reflexive
code: /-- A reflexive relation relates every element to itself. -/
def Reflexive 
goal: Prop

full_name: Symmetric
code: /-- A relation is symmetric if `x ≺ y` implies `y ≺ x`. -/
def Symmetric 
goal: Prop

full_name: Transitive
code: /-- A relation is transitive if `x ≺ y` and `y ≺ z` together imply `x ≺ z`. -/
def Transitive 
goal: Prop

full_name: Equivalence.reflexive
code: lemma Equivalence.reflexive {r : β → β → Prop} (h : Equivalence r) : Reflexive r 
goal: Reflexive r

full_name: Equivalence.symmetric
code: lemma Equivalence.symmetric {r : β → β → Prop} (h : Equivalence r) : Symmetric r 
goal: Symmetric r

full_name: Equivalence.transitive
code: lemma Equivalence.transitive {r : β → β → Prop} (h : Equivalence r) : Transitive r 
goal: Transitive r

full_name: Total
code: /-- A relation is total if for all `x` and `y`, either `x ≺ y` or `y ≺ x`. -/
def Total 
goal: Prop

full_name: Irreflexive
code: /-- Irreflexive means "not reflexive". -/
def Irreflexive 
goal: Prop

full_name: AntiSymmetric
code: /-- A relation is antisymmetric if `x ≺ y` and `y ≺ x` together imply that `x = y`. -/
def AntiSymmetric 
goal: Prop

full_name: EmptyRelation
code: /-- An empty relation does not relate any elements. -/
@[nolint unusedArguments]
def EmptyRelation 
goal: α → α → Prop

full_name: InvImage.trans
code: theorem InvImage.trans (f : α → β) (h : Transitive r) : Transitive (InvImage r f) 
goal: Transitive (InvImage r f)

full_name: InvImage.irreflexive
code: theorem InvImage.irreflexive (f : α → β) (h : Irreflexive r) : Irreflexive (InvImage r f) 
goal: Irreflexive (InvImage r f)

full_name: «_aux_Mathlib_Init_Logic___macroRules_term_*__1_1»
code: /-- Local notation for `f`, high priority to avoid ambiguity with `HMul.hMul`. -/
local infix:70 (priority := high) " * " => f
goal: Lean.Macro

full_name: «_aux_Mathlib_Init_Logic___macroRules_term_⁻¹_1»
code: /-- Local notation for `inv`, high priority to avoid ambiguity with `Inv.inv`. -/
local postfix:100 (priority := high) "⁻¹" => inv
goal: Lean.Macro

full_name: «_aux_Mathlib_Init_Logic___macroRules_term_+__1_1»
code: /-- Local notation for `g`, high priority to avoid ambiguity with `HAdd.hAdd`. -/
local infix:65 (priority := high) " + " => g
goal: Lean.Macro

full_name: Commutative
code: def Commutative       
goal: Prop

full_name: Associative
code: def Associative       
goal: Prop

full_name: LeftIdentity
code: def LeftIdentity      
goal: Prop

full_name: RightIdentity
code: def RightIdentity     
goal: Prop

full_name: RightInverse
code: def RightInverse      
goal: Prop

full_name: LeftCancelative
code: def LeftCancelative   
goal: Prop

full_name: RightCancelative
code: def RightCancelative  
goal: Prop

full_name: LeftDistributive
code: def LeftDistributive  
goal: Prop

full_name: RightDistributive
code: def RightDistributive 
goal: Prop

full_name: RightCommutative
code: def RightCommutative (h : β → α → β) 
goal: Prop

full_name: LeftCommutative
code: def LeftCommutative  (h : α → β → β) 
goal: Prop

full_name: left_comm
code: theorem left_comm : Commutative f → Associative f → LeftCommutative f 
goal: Commutative f → Associative f → LeftCommutative f

full_name: right_comm
code: theorem right_comm : Commutative f → Associative f → RightCommutative f 
goal: Commutative f → Associative f → RightCommutative f