File: Mathlib/Init/Algebra/Classes.lean

full_name: IsSymmOp.symm_op
code: class IsSymmOp (α : Sort u) (β : Sort v) (op : α → α → β) : Prop where
  symm_op : ∀ a b, op a b = op b a
goal: op a b = op b a

full_name: IsSymmOp
code: class IsSymmOp (α : Sort u) (β : Sort v) (op : α → α → β) : Prop where
  symm_op : ∀ a b, op a b = op b a
goal: Prop

full_name: IsCommutative
code: /-- A commutative binary operation. -/
@[deprecated Std.Commutative (since := "2024-02-02")]
abbrev IsCommutative (α : Sort u) (op : α → α → α) 
goal: Prop

full_name: isSymmOp_of_isCommutative
code: instance (priority := 100) isSymmOp_of_isCommutative (α : Sort u) (op : α → α → α)
    [Std.Commutative op] : IsSymmOp α α op 
goal: IsSymmOp α α op

full_name: IsAssociative
code: /-- An associative binary operation. -/
@[deprecated Std.Associative (since := "2024-02-02")]
abbrev IsAssociative (α : Sort u) (op : α → α → α) 
goal: Prop

full_name: IsLeftId
code: /-- A binary operation with a left identity. -/
@[deprecated Std.LawfulLeftIdentity (since := "2024-02-02")]
abbrev IsLeftId (α : Sort u) (op : α → α → α) (o : outParam α) 
goal: Prop

full_name: IsRightId
code: /-- A binary operation with a right identity. -/
@[deprecated Std.LawfulRightIdentity (since := "2024-02-02")]
abbrev IsRightId (α : Sort u) (op : α → α → α) (o : outParam α) 
goal: Prop

full_name: IsLeftCancel.left_cancel
code: class IsLeftCancel (α : Sort u) (op : α → α → α) : Prop where
  left_cancel : ∀ a b c, op a b = op a c → b = c
goal: op a b = op a c → b = c

full_name: IsLeftCancel
code: class IsLeftCancel (α : Sort u) (op : α → α → α) : Prop where
  left_cancel : ∀ a b c, op a b = op a c → b = c
goal: Prop

full_name: IsRightCancel.right_cancel
code: class IsRightCancel (α : Sort u) (op : α → α → α) : Prop where
  right_cancel : ∀ a b c, op a b = op c b → a = c
goal: op a b = op c b → a = c

full_name: IsRightCancel
code: class IsRightCancel (α : Sort u) (op : α → α → α) : Prop where
  right_cancel : ∀ a b c, op a b = op c b → a = c
goal: Prop

full_name: IsIdempotent
code: @[deprecated Std.IdempotentOp (since := "2024-02-02")]
abbrev IsIdempotent (α : Sort u) (op : α → α → α) 
goal: Prop

full_name: IsIrrefl
code: /-- `IsIrrefl X r` means the binary relation `r` on `X` is irreflexive (that is, `r x x` never
holds). -/
class IsIrrefl (α : Sort u) (r : α → α → Prop) : Prop where
  irrefl : ∀ a, ¬r a a
goal: Prop

full_name: IsIrrefl.irrefl
code: /-- `IsIrrefl X r` means the binary relation `r` on `X` is irreflexive (that is, `r x x` never
holds). -/
class IsIrrefl (α : Sort u) (r : α → α → Prop) : Prop where
  irrefl : ∀ a, ¬r a a
goal: ¬r a a

full_name: IsRefl.refl
code: /-- `IsRefl X r` means the binary relation `r` on `X` is reflexive. -/
class IsRefl (α : Sort u) (r : α → α → Prop) : Prop where
  refl : ∀ a, r a a
goal: r a a

full_name: IsRefl
code: /-- `IsRefl X r` means the binary relation `r` on `X` is reflexive. -/
class IsRefl (α : Sort u) (r : α → α → Prop) : Prop where
  refl : ∀ a, r a a
goal: Prop

full_name: IsSymm
code: /-- `IsSymm X r` means the binary relation `r` on `X` is symmetric. -/
class IsSymm (α : Sort u) (r : α → α → Prop) : Prop where
  symm : ∀ a b, r a b → r b a
goal: Prop

full_name: IsSymm.symm
code: /-- `IsSymm X r` means the binary relation `r` on `X` is symmetric. -/
class IsSymm (α : Sort u) (r : α → α → Prop) : Prop where
  symm : ∀ a b, r a b → r b a
goal: r a b → r b a

full_name: isSymmOp_of_isSymm
code: /-- The opposite of a symmetric relation is symmetric. -/
instance (priority := 100) isSymmOp_of_isSymm (α : Sort u) (r : α → α → Prop) [IsSymm α r] :
    IsSymmOp α Prop r 
goal: IsSymmOp α Prop r

full_name: IsAsymm.asymm
code: /-- `IsAsymm X r` means that the binary relation `r` on `X` is asymmetric, that is,
`r a b → ¬ r b a`. -/
class IsAsymm (α : Sort u) (r : α → α → Prop) : Prop where
  asymm : ∀ a b, r a b → ¬r b a
goal: r a b → ¬r b a

full_name: IsAsymm
code: /-- `IsAsymm X r` means that the binary relation `r` on `X` is asymmetric, that is,
`r a b → ¬ r b a`. -/
class IsAsymm (α : Sort u) (r : α → α → Prop) : Prop where
  asymm : ∀ a b, r a b → ¬r b a
goal: Prop

full_name: IsAntisymm
code: /-- `IsAntisymm X r` means the binary relation `r` on `X` is antisymmetric. -/
class IsAntisymm (α : Sort u) (r : α → α → Prop) : Prop where
  antisymm : ∀ a b, r a b → r b a → a = b
goal: Prop

full_name: IsAntisymm.antisymm
code: /-- `IsAntisymm X r` means the binary relation `r` on `X` is antisymmetric. -/
class IsAntisymm (α : Sort u) (r : α → α → Prop) : Prop where
  antisymm : ∀ a b, r a b → r b a → a = b
goal: r a b → r b a → a = b

full_name: IsAsymm.toIsAntisymm
code: instance (priority := 100) IsAsymm.toIsAntisymm {α : Sort u} (r : α → α → Prop) [IsAsymm α r] :
    IsAntisymm α r 
goal: IsAntisymm α r

full_name: IsTrans.trans
code: /-- `IsTrans X r` means the binary relation `r` on `X` is transitive. -/
class IsTrans (α : Sort u) (r : α → α → Prop) : Prop where
  trans : ∀ a b c, r a b → r b c → r a c
goal: r a b → r b c → r a c

full_name: IsTrans
code: /-- `IsTrans X r` means the binary relation `r` on `X` is transitive. -/
class IsTrans (α : Sort u) (r : α → α → Prop) : Prop where
  trans : ∀ a b c, r a b → r b c → r a c
goal: Prop

full_name: instTransOfIsTrans
code: instance {α : Sort u} {r : α → α → Prop} [IsTrans α r] : Trans r r r 
goal: Trans r r r

full_name: instIsTransOfTrans
code: instance (priority := 100) {α : Sort u} {r : α → α → Prop} [Trans r r r] : IsTrans α r 
goal: IsTrans α r

full_name: IsTotal.total
code: /-- `IsTotal X r` means that the binary relation `r` on `X` is total, that is, that for any
`x y : X` we have `r x y` or `r y x`. -/
class IsTotal (α : Sort u) (r : α → α → Prop) : Prop where
  total : ∀ a b, r a b ∨ r b a
goal: r a b ∨ r b a

full_name: IsTotal
code: /-- `IsTotal X r` means that the binary relation `r` on `X` is total, that is, that for any
`x y : X` we have `r x y` or `r y x`. -/
class IsTotal (α : Sort u) (r : α → α → Prop) : Prop where
  total : ∀ a b, r a b ∨ r b a
goal: Prop

full_name: IsPreorder
code: /-- `IsPreorder X r` means that the binary relation `r` on `X` is a pre-order, that is, reflexive
and transitive. -/
class IsPreorder (α : Sort u) (r : α → α → Prop) extends IsRefl α r, IsTrans α r : Prop
goal: Prop

full_name: IsTotalPreorder
code: /-- `IsTotalPreorder X r` means that the binary relation `r` on `X` is total and a preorder. -/
class IsTotalPreorder (α : Sort u) (r : α → α → Prop) extends IsTrans α r, IsTotal α r : Prop
goal: Prop

full_name: isTotalPreorder_isPreorder
code: /-- Every total pre-order is a pre-order. -/
instance (priority := 100) isTotalPreorder_isPreorder (α : Sort u) (r : α → α → Prop)
    [s : IsTotalPreorder α r] : IsPreorder α r 
goal: IsPreorder α r

full_name: IsPartialOrder
code: /-- `IsPartialOrder X r` means that the binary relation `r` on `X` is a partial order, that is,
`IsPreorder X r` and `IsAntisymm X r`. -/
class IsPartialOrder (α : Sort u) (r : α → α → Prop) extends IsPreorder α r, IsAntisymm α r : Prop
goal: Prop

full_name: IsLinearOrder
code: /-- `IsLinearOrder X r` means that the binary relation `r` on `X` is a linear order, that is,
`IsPartialOrder X r` and `IsTotal X r`. -/
class IsLinearOrder (α : Sort u) (r : α → α → Prop) extends IsPartialOrder α r, IsTotal α r : Prop
goal: Prop

full_name: IsEquiv
code: /-- `IsEquiv X r` means that the binary relation `r` on `X` is an equivalence relation, that
is, `IsPreorder X r` and `IsSymm X r`. -/
class IsEquiv (α : Sort u) (r : α → α → Prop) extends IsPreorder α r, IsSymm α r : Prop
goal: Prop

full_name: IsStrictOrder
code: /-- `IsStrictOrder X r` means that the binary relation `r` on `X` is a strict order, that is,
`IsIrrefl X r` and `IsTrans X r`. -/
class IsStrictOrder (α : Sort u) (r : α → α → Prop) extends IsIrrefl α r, IsTrans α r : Prop
goal: Prop

full_name: IsIncompTrans.incomp_trans
code: /-- `IsIncompTrans X lt` means that for `lt` a binary relation on `X`, the incomparable relation
`fun a b => ¬ lt a b ∧ ¬ lt b a` is transitive. -/
class IsIncompTrans (α : Sort u) (lt : α → α → Prop) : Prop where
  incomp_trans : ∀ a b c, ¬lt a b ∧ ¬lt b a → ¬lt b c ∧ ¬lt c b → ¬lt a c ∧ ¬lt c a
goal: ¬lt a b ∧ ¬lt b a → ¬lt b c ∧ ¬lt c b → ¬lt a c ∧ ¬lt c a

full_name: IsIncompTrans
code: /-- `IsIncompTrans X lt` means that for `lt` a binary relation on `X`, the incomparable relation
`fun a b => ¬ lt a b ∧ ¬ lt b a` is transitive. -/
class IsIncompTrans (α : Sort u) (lt : α → α → Prop) : Prop where
  incomp_trans : ∀ a b c, ¬lt a b ∧ ¬lt b a → ¬lt b c ∧ ¬lt c b → ¬lt a c ∧ ¬lt c a
goal: Prop

full_name: IsStrictWeakOrder
code: /-- `IsStrictWeakOrder X lt` means that the binary relation `lt` on `X` is a strict weak order,
that is, `IsStrictOrder X lt` and `IsIncompTrans X lt`. -/
class IsStrictWeakOrder (α : Sort u) (lt : α → α → Prop) extends IsStrictOrder α lt,
    IsIncompTrans α lt : Prop
goal: Prop

full_name: IsTrichotomous
code: /-- `IsTrichotomous X lt` means that the binary relation `lt` on `X` is trichotomous, that is,
either `lt a b` or `a = b` or `lt b a` for any `a` and `b`. -/
class IsTrichotomous (α : Sort u) (lt : α → α → Prop) : Prop where
  trichotomous : ∀ a b, lt a b ∨ a = b ∨ lt b a
goal: Prop

full_name: IsTrichotomous.trichotomous
code: /-- `IsTrichotomous X lt` means that the binary relation `lt` on `X` is trichotomous, that is,
either `lt a b` or `a = b` or `lt b a` for any `a` and `b`. -/
class IsTrichotomous (α : Sort u) (lt : α → α → Prop) : Prop where
  trichotomous : ∀ a b, lt a b ∨ a = b ∨ lt b a
goal: lt a b ∨ a = b ∨ lt b a

full_name: IsStrictTotalOrder
code: /-- `IsStrictTotalOrder X lt` means that the binary relation `lt` on `X` is a strict total order,
that is, `IsTrichotomous X lt` and `IsStrictOrder X lt`. -/
class IsStrictTotalOrder (α : Sort u) (lt : α → α → Prop) extends IsTrichotomous α lt,
    IsStrictOrder α lt : Prop
goal: Prop

full_name: eq_isEquiv
code: /-- Equality is an equivalence relation. -/
instance eq_isEquiv (α : Sort u) : IsEquiv α (· = ·) 
goal: IsEquiv α fun x x_1 => x = x_1

full_name: «_aux_Mathlib_Init_Algebra_Classes___macroRules_term_≺__1»
code: local infixl:50 " ≺ " => r
goal: Lean.Macro

full_name: irrefl
code: theorem irrefl [IsIrrefl α r] (a : α) : ¬a ≺ a 
goal: ¬r a a

full_name: refl
code: theorem refl [IsRefl α r] (a : α) : a ≺ a 
goal: r a a

full_name: trans
code: theorem trans [IsTrans α r] {a b c : α} : a ≺ b → b ≺ c → a ≺ c 
goal: r a b → r b c → r a c

full_name: symm
code: theorem symm [IsSymm α r] {a b : α} : a ≺ b → b ≺ a 
goal: r a b → r b a

full_name: antisymm
code: theorem antisymm [IsAntisymm α r] {a b : α} : a ≺ b → b ≺ a → a = b 
goal: r a b → r b a → a = b

full_name: asymm
code: theorem asymm [IsAsymm α r] {a b : α} : a ≺ b → ¬b ≺ a 
goal: r a b → ¬r b a

full_name: trichotomous
code: theorem trichotomous [IsTrichotomous α r] : ∀ a b : α, a ≺ b ∨ a = b ∨ b ≺ a 
goal: r a b ∨ a = b ∨ r b a

full_name: incomp_trans
code: theorem incomp_trans [IsIncompTrans α r] {a b c : α} :
    ¬a ≺ b ∧ ¬b ≺ a → ¬b ≺ c ∧ ¬c ≺ b → ¬a ≺ c ∧ ¬c ≺ a 
goal: ¬r a b ∧ ¬r b a → ¬r b c ∧ ¬r c b → ¬r a c ∧ ¬r c a

full_name: isAsymm_of_isTrans_of_isIrrefl
code: instance (priority := 90) isAsymm_of_isTrans_of_isIrrefl [IsTrans α r] [IsIrrefl α r] :
    IsAsymm α r 
goal: IsAsymm α r

full_name: irrefl_of
code: @[elab_without_expected_type]
theorem irrefl_of [IsIrrefl α r] (a : α) : ¬a ≺ a 
goal: ¬r a a

full_name: refl_of
code: @[elab_without_expected_type]
theorem refl_of [IsRefl α r] (a : α) : a ≺ a 
goal: r a a

full_name: trans_of
code: @[elab_without_expected_type]
theorem trans_of [IsTrans α r] {a b c : α} : a ≺ b → b ≺ c → a ≺ c 
goal: r a b → r b c → r a c

full_name: symm_of
code: @[elab_without_expected_type]
theorem symm_of [IsSymm α r] {a b : α} : a ≺ b → b ≺ a 
goal: r a b → r b a

full_name: asymm_of
code: @[elab_without_expected_type]
theorem asymm_of [IsAsymm α r] {a b : α} : a ≺ b → ¬b ≺ a 
goal: r a b → ¬r b a

full_name: total_of
code: @[elab_without_expected_type]
theorem total_of [IsTotal α r] (a b : α) : a ≺ b ∨ b ≺ a 
goal: r a b ∨ r b a

full_name: trichotomous_of
code: @[elab_without_expected_type]
theorem trichotomous_of [IsTrichotomous α r] : ∀ a b : α, a ≺ b ∨ a = b ∨ b ≺ a 
goal: r a b ∨ a = b ∨ r b a

full_name: incomp_trans_of
code: @[elab_without_expected_type]
theorem incomp_trans_of [IsIncompTrans α r] {a b c : α} :
    ¬a ≺ b ∧ ¬b ≺ a → ¬b ≺ c ∧ ¬c ≺ b → ¬a ≺ c ∧ ¬c ≺ a 
goal: ¬r a b ∧ ¬r b a → ¬r b c ∧ ¬r c b → ¬r a c ∧ ¬r c a

full_name: StrictWeakOrder.«_aux_Mathlib_Init_Algebra_Classes___macroRules_StrictWeakOrder_term_≺__1»
code: local infixl:50 " ≺ " => r
goal: Lean.Macro

full_name: StrictWeakOrder.Equiv
code: def Equiv (a b : α) : Prop 
goal: Prop

full_name: StrictWeakOrder.«_aux_Mathlib_Init_Algebra_Classes___macroRules_StrictWeakOrder_term_≈__1»
code: local infixl:50 " ≈ " => @Equiv _ r
goal: Lean.Macro

full_name: StrictWeakOrder.erefl
code: theorem erefl (a : α) : a ≈ a 
goal: StrictWeakOrder.Equiv a a

full_name: StrictWeakOrder.esymm
code: theorem esymm {a b : α} : a ≈ b → b ≈ a 
goal: StrictWeakOrder.Equiv a b → StrictWeakOrder.Equiv b a

full_name: StrictWeakOrder.etrans
code: theorem etrans {a b c : α} : a ≈ b → b ≈ c → a ≈ c 
goal: StrictWeakOrder.Equiv a b → StrictWeakOrder.Equiv b c → StrictWeakOrder.Equiv a c

full_name: StrictWeakOrder.not_lt_of_equiv
code: theorem not_lt_of_equiv {a b : α} : a ≈ b → ¬a ≺ b 
goal: StrictWeakOrder.Equiv a b → ¬r a b

full_name: StrictWeakOrder.not_lt_of_equiv'
code: theorem not_lt_of_equiv' {a b : α} : a ≈ b → ¬b ≺ a 
goal: StrictWeakOrder.Equiv a b → ¬r b a

full_name: StrictWeakOrder.isEquiv
code: instance isEquiv : IsEquiv α (@Equiv _ r) 
goal: IsEquiv α StrictWeakOrder.Equiv

full_name: StrictWeakOrder.«_aux_Mathlib_Init_Algebra_Classes___macroRules_StrictWeakOrder_term_≈[_]__1»
code: /-- The equivalence relation induced by `lt` -/
notation:50 a " ≈[" lt "]" b:50 => @Equiv _ lt a b
goal: Lean.Macro

full_name: isStrictWeakOrder_of_isTotalPreorder
code: theorem isStrictWeakOrder_of_isTotalPreorder {α : Sort u} {le : α → α → Prop} {lt : α → α → Prop}
    [DecidableRel le] [IsTotalPreorder α le] (h : ∀ a b, lt a b ↔ ¬le b a) :
    IsStrictWeakOrder α lt 
goal: IsStrictWeakOrder α lt

full_name: lt_of_lt_of_incomp
code: theorem lt_of_lt_of_incomp {α : Sort u} {lt : α → α → Prop} [IsStrictWeakOrder α lt]
    [DecidableRel lt] : ∀ {a b c}, lt a b → ¬lt b c ∧ ¬lt c b → lt a c 
goal: lt a b → ¬lt b c ∧ ¬lt c b → lt a c

full_name: lt_of_incomp_of_lt
code: theorem lt_of_incomp_of_lt {α : Sort u} {lt : α → α → Prop} [IsStrictWeakOrder α lt]
    [DecidableRel lt] : ∀ {a b c}, ¬lt a b ∧ ¬lt b a → lt b c → lt a c 
goal: ¬lt a b ∧ ¬lt b a → lt b c → lt a c

full_name: eq_of_incomp
code: theorem eq_of_incomp {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] {a b} :
    ¬lt a b ∧ ¬lt b a → a = b 
goal: ¬lt a b ∧ ¬lt b a → a = b

full_name: eq_of_eqv_lt
code: theorem eq_of_eqv_lt {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] {a b} :
    a ≈[lt]b → a = b 
goal: StrictWeakOrder.Equiv a b → a = b

full_name: incomp_iff_eq
code: theorem incomp_iff_eq {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] [IsIrrefl α lt] (a b) :
    ¬lt a b ∧ ¬lt b a ↔ a = b 
goal: ¬lt a b ∧ ¬lt b a ↔ a = b

full_name: eqv_lt_iff_eq
code: theorem eqv_lt_iff_eq {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] [IsIrrefl α lt] (a b) :
    a ≈[lt]b ↔ a = b 
goal: StrictWeakOrder.Equiv a b ↔ a = b

full_name: not_lt_of_lt
code: theorem not_lt_of_lt {α : Sort u} {lt : α → α → Prop} [IsStrictOrder α lt] {a b} :
    lt a b → ¬lt b a 
goal: lt a b → ¬lt b a