lemmamidpointRootRaw_strict {n : ℕ} {a b r s : Fin n}
(hab : a < b) (hrs : r < s)
(hgap : (b.val : ℝ) - a.val ≤ (s.val : ℝ) - r.val)
(hne : ¬ (r = a ∧ s = b)) :
midpointRootRaw a b r < midpointRootRaw a b s :=by
proof · 27
lines
havehab' : (a.val : ℝ) < b.val :=by exact_mod_cast hab
havehrs' : (r.val : ℝ) < s.val :=by exact_mod_cast hrs
by_cases hra : r = a
· subst r
havehsb : s ≠ b :=fun h => hne ⟨rfl, h⟩
havehsa : s ≠ a := (ne_of_lt hrs).symm
simp only [midpointRootRaw, true_or, ite_true, hsa, hsb, or_self, ite_false]
linarith
by_cases hrb : r = b
· subst r
havehsa : s ≠ a :=by
intro h
subst s
exact (lt_asymm hab hrs)
havehsb : s ≠ b := (ne_of_lt hrs).symm
simp [midpointRootRaw, hsa, hsb]
linarith
by_cases hsa : s = a
· subst s
simp only [midpointRootRaw, hra, hrb, or_self, ite_false, true_or, ite_true]
linarith
by_cases hsb : s = b
· subst s
simp only [midpointRootRaw, hra, hrb, hsa, false_or, or_self, ite_false, ite_true]
linarith
simp only [midpointRootRaw, hra, hrb, hsa, hsb, or_self, ite_false]
exact hrs'
A nonempty collection of positive type-A roots has a root which can
be made neutral while every other root remains strictly contracting.
theoremerase_shortest_root_closed (n : ℕ)
(S : Finset (Fin n ×Fin n))
(hpos : ∀ p ∈S, p.1 < p.2)
(hcomp : ∀a b c : Fin n, (a, b) ∈S→ (b, c) ∈S→ (a, c) ∈S)
(p : Fin n ×Fin n)
(hmin : ∀ q ∈S, p.2.val - p.1.val ≤ q.2.val - q.1.val) :
∀a b c : Fin n, (a, b) ∈S.erase p → (b, c) ∈S.erase p → (a, c) ∈S.erase p :=by
proof · 13
lines
intro a b c hab hbc
have habS := (Finset.mem_erase.mp hab).2have hbcS := (Finset.mem_erase.mp hbc).2
refine Finset.mem_erase.mpr ⟨?_, hcomp a b c habS hbcS⟩
intro he
subst p
have hsmall := hmin (a, b) habS
have h₁ := hpos (a, b) habS
have h₂ := hpos (b, c) hbcS
change a.val < b.val at h₁
change b.val < c.val at h₂
change c.val - a.val ≤ b.val - a.val at hsmall
omega