fix(tests/lean): to reflect changes in the standard library
This commit is contained in:
parent
ae0daf9639
commit
7000365a04
3 changed files with 3 additions and 16 deletions
|
@ -20,7 +20,7 @@ context sec_cat
|
|||
parameters {ob : Type} {mor : ob → ob → Type} {Cat : category ob mor}
|
||||
definition compose := rec (λ comp id assoc idr idl, comp) Cat
|
||||
definition id := rec (λ comp id assoc idr idl, id) Cat
|
||||
infixr `∘`:60 := compose
|
||||
infixr ∘ := compose
|
||||
inductive is_section {A B : ob} (f : mor A B) : Type :=
|
||||
mk : ∀g, g ∘ f = id → is_section f
|
||||
end sec_cat
|
||||
|
|
|
@ -20,6 +20,6 @@ section sec_cat
|
|||
variables {ob : Type} {mor : ob → ob → Type} {Cat : category ob mor}
|
||||
definition compose := rec (λ comp id assoc idr idl, comp) Cat
|
||||
definition id := rec (λ comp id assoc idr idl, id) Cat
|
||||
infixr `∘`:60 := compose
|
||||
infixr ∘ := compose
|
||||
end sec_cat
|
||||
end category
|
||||
|
|
|
@ -2,24 +2,11 @@ import logic algebra.relation
|
|||
open relation
|
||||
|
||||
namespace is_equivalence
|
||||
inductive cls {T : Type} (R : T → T → Type) : Prop :=
|
||||
inductive cls {T : Type} (R : T → T → Prop) : Prop :=
|
||||
mk : is_reflexive R → is_symmetric R → is_transitive R → cls R
|
||||
|
||||
theorem is_reflexive {T : Type} {R : T → T → Type} {C : cls R} : is_reflexive R :=
|
||||
cls.rec (λx y z, x) C
|
||||
|
||||
theorem is_symmetric {T : Type} {R : T → T → Type} {C : cls R} : is_symmetric R :=
|
||||
cls.rec (λx y z, y) C
|
||||
|
||||
theorem is_transitive {T : Type} {R : T → T → Type} {C : cls R} : is_transitive R :=
|
||||
cls.rec (λx y z, z) C
|
||||
|
||||
end is_equivalence
|
||||
|
||||
instance is_equivalence.is_reflexive
|
||||
instance is_equivalence.is_symmetric
|
||||
instance is_equivalence.is_transitive
|
||||
|
||||
theorem and_inhabited_left {a : Prop} (b : Prop) (Ha : a) : a ∧ b ↔ b :=
|
||||
iff.intro (take Hab, and.elim_right Hab) (take Hb, and.intro Ha Hb)
|
||||
|
||||
|
|
Loading…
Reference in a new issue