import Math.ApTangent import Math.ApTangentFormal import Math.CircleEqScaled /-! # The AP-parallel tangency statement in a scaled-circle formulation This file restates the main goal of [ajc59j] in terms of `CircleEqScaled.CircleEq` (scaled circle equations) and reduces it to a single remaining algebraic goal. We use the determinant circle construction (via `Math.ApTangentFormal`) to produce *some* scaled circle equation through $B,E,F$. The only remaining step is to prove that the line through $H$ parallel to $AP$ is tangent (in the denominator-free sense `CircleEqScaled.IsTangent`) to that circle. -/ namespace ApTangentMainScaled noncomputable section open ApTangent namespace Coord variable {r R d x0 y0 : ℝ} /-- Convert the triple coefficients from `ApTangent.lineThroughH_parallelAP` into a `LineEq`. -/ def lineEqThroughH_parallelAP (r R d x0 y0 : ℝ) : CircleEqScaled.LineEq := let L := ApTangent.lineThroughH_parallelAP r R d x0 y0 ⟨L.1, L.2.1, L.2.2⟩ /-- **Main goal (scaled-circle form).** There exists a scaled circle equation through $B,E,F$ tangent to the line through $H$ parallel to $AP$. This is equivalent to the original statement (tangency is scale-invariant). **Status**: all existence/membership parts are proved; only the final tangency identity remains. -/ theorem tangency_main_scaled (hd : ApTangent.IntersectData r R d x0 y0) (hr : 0 < r) (hR : r < R) (hd' : 0 < d) (hw : ApTangent.dot (ApTangent.w r R d x0 y0) (ApTangent.w r R d x0 y0) ≠ 0) (hv : ApTangent.v r R d x0 y0 ≠ 0) : ∃ s : CircleEqScaled.CircleEq, s.Mem (ApTangent.B x0 y0) ∧ s.Mem (ApTangent.E r R d x0 y0) ∧ s.Mem (ApTangent.F r R d x0 y0) ∧ CircleEqScaled.IsTangent s (lineEqThroughH_parallelAP r R d x0 y0) := by classical -- choose a scaled circle equation through B,E,F using the determinant construction have hex : ∃ s : CircleEqScaled.CircleEq, s.Mem (ApTangent.B x0 y0) ∧ s.Mem (ApTangent.E r R d x0 y0) ∧ s.Mem (ApTangent.F r R d x0 y0) := by simpa using (ApTangentFormal.exists_scaledCircle_through (p1 := ApTangent.B x0 y0) (p2 := ApTangent.E r R d x0 y0) (p3 := ApTangent.F r R d x0 y0)) rcases hex with ⟨s, hsB, hsE, hsF⟩ refine ⟨s, hsB, hsE, hsF, ?_⟩ -- Remaining goal: tangency, expected to be discharged by heavy algebra. -- (This is the single place where the proof of [ajc59j] is not yet fully formalized.) sorry end Coord end end ApTangentMainScaled