Skip to content

Commit

Permalink
feat(linear_algebra/affine_space): simplex ext lemmas (#3669)
Browse files Browse the repository at this point in the history
Add `ext` lemmas for `affine_space.simplex`.
  • Loading branch information
jsm28 committed Aug 3, 2020
1 parent 60ba478 commit d6c17c9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/linear_algebra/affine_space.lean
Expand Up @@ -437,6 +437,23 @@ instance [inhabited P] : inhabited (simplex k V P 0) :=
instance nonempty : nonempty (simplex k V P 0) :=
⟨mk_of_point k V $ (add_torsor.nonempty V).some⟩

variables {k V}

/-- Two simplices are equal if they have the same points. -/
@[ext] lemma ext {n : ℕ} {s1 s2 : simplex k V P n} (h : ∀ i, s1.points i = s2.points i) :
s1 = s2 :=
begin
cases s1,
cases s2,
congr,
ext i,
exact h i
end

/-- Two simplices are equal if and only if they have the same points. -/
lemma ext_iff {n : ℕ} (s1 s2 : simplex k V P n): s1 = s2 ↔ ∀ i, s1.points i = s2.points i :=
⟨λ h _, h ▸ rfl, ext⟩

end simplex

end affine_space
Expand Down

0 comments on commit d6c17c9

Please sign in to comment.