Problem (2016CanadaMOp5): Let $\triangle ABC$ be an acute-angled triangle with altitudes $AD$ and $BE$ meeting at $H$. Let $M$ be the midpoint of segment $AB$, and suppose that the circumcircles of $\triangle DEM$ and $\triangle ABH$ meet at points $P$ and $Q$ with $P$ on the same side of $CH$ as $A$. Prove that the lines $ED, PH,$ and $MQ$ all pass through a single point on the circumcircle of $\triangle ABC$.
AlphaGeometry formalization: a b c = triangle; d = foot a b c; e = foot b a c; h = orthocenter a b c; m = midpoint a b; o1 = circumcenter d e m; o2 = circumcenter a b h; p = on_circle o1 d, on_circle o2 a; q = on_circle o1 d, on_circle o2 a; x = on_line e d, on_line p h ? coll x m q
HAGeo formalization: A B C = triangle; BC = line B C; AC = line A C; D = foot A BC; E = foot B AC; H = orthocenter A B C; M = midpoint A B; O1 = circumcenter D E M; O2 = circumcenter A B H; (O1) = circle_center_point O1 D; (O2) = circle_center_point O2 A; P Q = intersection (O1) (O2); ED = line E D; PH = line P H; X = intersection ED PH; Prove: collinear X M Q
Difficulty score: 4.2