File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Mathlib/Geometry/Euclidean Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,19 @@ def height {n : ℕ} [NeZero n] (s : Simplex ℝ P n) (i : Fin (n + 1)) : ℝ :=
171171lemma height_pos {n : ℕ} [NeZero n] (s : Simplex ℝ P n) (i : Fin (n + 1 )) : 0 < s.height i := by
172172 simp [height]
173173
174+ open Qq Mathlib.Meta.Positivity in
175+ /-- Extension for the `positivity` tactic: the height of a simplex is always positive. -/
176+ @[positivity height _ _]
177+ def evalHeight : PositivityExt where eval {u α} _ _ e := do
178+ match u, α, e with
179+ | 0 , ~q(ℝ), ~q(@height $V $P $i1 $i2 $i3 $i4 $n $hn $s $i) =>
180+ assertInstancesCommute
181+ return .positive q(height_pos $s $i)
182+ | _, _, _ => throwError "not Simplex.height"
183+
184+ example {n : ℕ} [NeZero n] (s : Simplex ℝ P n) (i : Fin (n + 1 )) : 0 < s.height i := by
185+ positivity
186+
174187end Simplex
175188
176189end Affine
You can’t perform that action at this time.
0 commit comments