ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Topology/Baire/LocallyCompactRegular.lean

full_name: BaireSpace.of_t2Space_locallyCompactSpace
code: /-- **Second Baire theorem**: locally compact R₁ spaces are Baire. -/
instance (priority := 100) BaireSpace.of_t2Space_locallyCompactSpace {X : Type*}
    [TopologicalSpace X] [R1Space X] [LocallyCompactSpace X] : BaireSpace X 
goal: BaireSpace X
File: Mathlib/Topology/Connected/Separation.lean

full_name: TotallySeparatedSpace.t2Space
code: /-- A totally separated space is T2. -/
instance TotallySeparatedSpace.t2Space [TotallySeparatedSpace X] : T2Space X 
goal: T2Space X
File: Mathlib/Geometry/Manifold/Metrizable.lean

full_name: ManifoldWithCorners.metrizableSpace
code: /-- A σ-compact Hausdorff topological manifold over a finite dimensional real vector space is
metrizable. -/
theorem ManifoldWithCorners.metrizableSpace {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H)
    (M : Type*) [TopologicalSpace M] [ChartedSpace H M] [SigmaCompactSpace M] [T2Space M] :
    MetrizableSpace M 
goal: TopologicalSpace.MetrizableSpace M
File: Mathlib/Topology/ClopenBox.lean

full_name: TopologicalSpace.Clopens.exists_prod_subset
code: theorem TopologicalSpace.Clopens.exists_prod_subset (W : Clopens (X × Y)) {a : X × Y} (h : a ∈ W) :
    ∃ U : Clopens X, a.1 ∈ U ∧ ∃ V : Clopens Y, a.2 ∈ V ∧ U ×ˢ V ≤ W 
goal: ∃ U, a.1 ∈ U ∧ ∃ V, a.2 ∈ V ∧ U ×ˢ V ≤ W

full_name: TopologicalSpace.Clopens.exists_finset_eq_sup_prod
code: /-- Every clopen set in a product of two compact spaces
is a union of finitely many clopen boxes. -/
theorem TopologicalSpace.Clopens.exists_finset_eq_sup_prod (W : Clopens (X × Y)) :
    ∃ (I : Finset (Clopens X × Clopens Y)), W = I.sup fun i ↦ i.1 ×ˢ i.2 
goal: ∃ I, W = I.sup fun i => i.1 ×ˢ i.2

full_name: TopologicalSpace.Clopens.surjective_finset_sup_prod
code: lemma TopologicalSpace.Clopens.surjective_finset_sup_prod :
    Surjective fun I : Finset (Clopens X × Clopens Y) ↦ I.sup fun i ↦ i.1 ×ˢ i.2 
goal: Function.Surjective fun I => I.sup fun i => i.1 ×ˢ i.2

full_name: TopologicalSpace.Clopens.countable_prod
code: instance TopologicalSpace.Clopens.countable_prod [Countable (Clopens X)]
    [Countable (Clopens Y)] : Countable (Clopens (X × Y)) 
goal: Countable (TopologicalSpace.Clopens (X × Y))

full_name: TopologicalSpace.Clopens.finite_prod
code: instance TopologicalSpace.Clopens.finite_prod [Finite (Clopens X)] [Finite (Clopens Y)] :
    Finite (Clopens (X × Y)) 
goal: Finite (TopologicalSpace.Clopens (X × Y))

full_name: TopologicalSpace.Clopens.countable_iff_second_countable
code: lemma TopologicalSpace.Clopens.countable_iff_second_countable [T2Space X]
    [TotallyDisconnectedSpace X] : Countable (Clopens X) ↔ SecondCountableTopology X 
goal: Countable (TopologicalSpace.Clopens X) ↔ SecondCountableTopology X
File: Mathlib/Topology/Baire/CompleteMetrizable.lean

full_name: BaireSpace.of_pseudoEMetricSpace_completeSpace
code: /-- **First Baire theorem**: a completely metrizable topological space has Baire property.

Since `Mathlib` does not have the notion of a completely metrizable topological space yet,
we state it for a complete uniform space with countably generated uniformity filter. -/
instance (priority := 100) BaireSpace.of_pseudoEMetricSpace_completeSpace : BaireSpace X 
goal: BaireSpace X
File: Mathlib/Geometry/Manifold/PoincareConjecture.lean

full_name: _aux_Mathlib_Geometry_Manifold_PoincareConjecture___macroRules_termℝ__1
code: macro:max "ℝ"n:superscript(term) : term => `(EuclideanSpace ℝ (Fin $(⟨n.raw[0]⟩)))
goal: Lean.Macro

full_name: termℝ_._@.Mathlib.Geometry.Manifold.PoincareConjecture._hyg.5
code: macro:max "ℝ"n:superscript(term) : term => `(EuclideanSpace ℝ (Fin $(⟨n.raw[0]⟩)))
goal: Lean.ParserDescr

full_name: term𝕊_._@.Mathlib.Geometry.Manifold.PoincareConjecture._hyg.261
code: macro:max "𝕊"n:superscript(term) : term =>
  `(sphere (0 : EuclideanSpace ℝ (Fin ($(⟨n.raw[0]⟩) + 1))) 1)
goal: Lean.ParserDescr

full_name: _aux_Mathlib_Geometry_Manifold_PoincareConjecture___macroRules_term𝕊__1
code: macro:max "𝕊"n:superscript(term) : term =>
  `(sphere (0 : EuclideanSpace ℝ (Fin ($(⟨n.raw[0]⟩) + 1))) 1)
goal: Lean.Macro

full_name: ContinuousMap.HomotopyEquiv.NonemptyDiffeomorphSphere
code: /-- The smooth Poincaré conjecture; true for n = 1, 2, 3, 5, 6, 12, 56, and 61,
open for n = 4, and it is conjectured that there are no other n > 4 for which it is true
(Conjecture 1.17, https://annals.math.princeton.edu/2017/186-2/p03). -/
def ContinuousMap.HomotopyEquiv.NonemptyDiffeomorphSphere (n : ℕ) : Prop 
goal: Prop
File: Mathlib/Geometry/Manifold/Instances/UnitsOfNormedAlgebra.lean

full_name: Units.instChartedSpace
code: instance : ChartedSpace R Rˣ 
goal: ChartedSpace R Rˣ

full_name: Units.chartAt_apply
code: theorem chartAt_apply {a : Rˣ} {b : Rˣ} : chartAt R a b = b 
goal: ↑(chartAt R a) b = ↑b

full_name: Units.chartAt_source
code: theorem chartAt_source {a : Rˣ} : (chartAt R a).source = Set.univ 
goal: (chartAt R a).source = Set.univ

full_name: Units.instSmoothManifoldWithCornersModelWithCornersSelf
code: instance : SmoothManifoldWithCorners 𝓘(𝕜, R) Rˣ 
goal: SmoothManifoldWithCorners 𝓘(𝕜, R) Rˣ

full_name: Units.contMDiff_val
code: /-- For a complete normed ring `R`, the embedding of the units `Rˣ` into `R` is a smooth map between
manifolds. -/
lemma contMDiff_val {m : ℕ∞} : ContMDiff 𝓘(𝕜, R) 𝓘(𝕜, R) m (val : Rˣ → R) 
goal: ContMDiff 𝓘(𝕜, R) 𝓘(𝕜, R) m Units.val

full_name: Units.instLieGroupModelWithCornersSelf
code: /-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ 
goal: LieGroup 𝓘(𝕜, R) Rˣ
File: Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean

full_name: uniqueMDiffWithinAt_iff_uniqueDiffWithinAt
code: theorem uniqueMDiffWithinAt_iff_uniqueDiffWithinAt :
    UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x 
goal: UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x

full_name: uniqueMDiffOn_iff_uniqueDiffOn
code: theorem uniqueMDiffOn_iff_uniqueDiffOn : UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s 
goal: UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s

full_name: writtenInExtChartAt_model_space
code: theorem writtenInExtChartAt_model_space : writtenInExtChartAt 𝓘(𝕜, E) 𝓘(𝕜, E') x f = f 
goal: writtenInExtChartAt 𝓘(𝕜, E) 𝓘(𝕜, E') x f = f

full_name: hasMFDerivWithinAt_iff_hasFDerivWithinAt
code: theorem hasMFDerivWithinAt_iff_hasFDerivWithinAt {f'} :
    HasMFDerivWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x f' ↔ HasFDerivWithinAt f f' s x 
goal: HasMFDerivWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x f' ↔ HasFDerivWithinAt f f' s x

full_name: hasMFDerivAt_iff_hasFDerivAt
code: theorem hasMFDerivAt_iff_hasFDerivAt {f'} :
    HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x 
goal: HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x

full_name: mdifferentiableWithinAt_iff_differentiableWithinAt
code: /-- For maps between vector spaces, `MDifferentiableWithinAt` and `DifferentiableWithinAt`
coincide -/
theorem mdifferentiableWithinAt_iff_differentiableWithinAt :
    MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x ↔ DifferentiableWithinAt 𝕜 f s x 
goal: MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x ↔ DifferentiableWithinAt 𝕜 f s x

full_name: mdifferentiableAt_iff_differentiableAt
code: /-- For maps between vector spaces, `MDifferentiableAt` and `DifferentiableAt` coincide -/
theorem mdifferentiableAt_iff_differentiableAt :
    MDifferentiableAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x ↔ DifferentiableAt 𝕜 f x 
goal: MDifferentiableAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x ↔ DifferentiableAt 𝕜 f x

full_name: mdifferentiableOn_iff_differentiableOn
code: /-- For maps between vector spaces, `MDifferentiableOn` and `DifferentiableOn` coincide -/
theorem mdifferentiableOn_iff_differentiableOn :
    MDifferentiableOn 𝓘(𝕜, E) 𝓘(𝕜, E') f s ↔ DifferentiableOn 𝕜 f s 
goal: MDifferentiableOn 𝓘(𝕜, E) 𝓘(𝕜, E') f s ↔ DifferentiableOn 𝕜 f s

full_name: mdifferentiable_iff_differentiable
code: /-- For maps between vector spaces, `MDifferentiable` and `Differentiable` coincide -/
theorem mdifferentiable_iff_differentiable :
    MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f 
goal: MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f

full_name: mfderivWithin_eq_fderivWithin
code: /-- For maps between vector spaces, `mfderivWithin` and `fderivWithin` coincide -/
@[simp]
theorem mfderivWithin_eq_fderivWithin :
    mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x 
goal: mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x

full_name: mfderiv_eq_fderiv
code: /-- For maps between vector spaces, `mfderiv` and `fderiv` coincide -/
@[simp]
theorem mfderiv_eq_fderiv : mfderiv 𝓘(𝕜, E) 𝓘(𝕜, E') f x = fderiv 𝕜 f x 
goal: mfderiv 𝓘(𝕜, E) 𝓘(𝕜, E') f x = fderiv 𝕜 f x
File: Mathlib/Geometry/Manifold/VectorBundle/Pullback.lean

full_name: SmoothVectorBundle.pullback
code: /-- For a smooth vector bundle `E` over a manifold `B` and a smooth map `f : B' → B`, the pullback
vector bundle `f *ᵖ E` is a smooth vector bundle. -/
instance SmoothVectorBundle.pullback : SmoothVectorBundle F (f *ᵖ E) IB' 
goal: SmoothVectorBundle F (⇑f *ᵖ E) IB'
File: Mathlib/Geometry/Manifold/Sheaf/Basic.lean

full_name: TopCat.of.chartedSpace
code: instance TopCat.of.chartedSpace : ChartedSpace H (TopCat.of M) 
goal: ChartedSpace H ↑(TopCat.of M)

full_name: TopCat.of.hasGroupoid
code: instance TopCat.of.hasGroupoid [HasGroupoid M G] : HasGroupoid (TopCat.of M) G 
goal: HasGroupoid (↑(TopCat.of M)) G

full_name: StructureGroupoid.LocalInvariantProp.localPredicate
code: /-- Let `P` be a `LocalInvariantProp` for functions between spaces with the groupoids `G`, `G'`
and let `M`, `M'` be charted spaces modelled on the model spaces of those groupoids.  Then there is
an induced `LocalPredicate` on the functions from `M` to `M'`, given by `LiftProp P`. -/
def StructureGroupoid.LocalInvariantProp.localPredicate (hG : LocalInvariantProp G G' P) :
    TopCat.LocalPredicate fun _ : TopCat.of M => M' 
goal: TopCat.LocalPredicate fun x => M'

full_name: StructureGroupoid.LocalInvariantProp.sheaf
code: /-- Let `P` be a `LocalInvariantProp` for functions between spaces with the groupoids `G`, `G'`
and let `M`, `M'` be charted spaces modelled on the model spaces of those groupoids.  Then there is
a sheaf of types on `M` which, to each open set `U` in `M`, associates the type of bundled
functions from `U` to `M'` satisfying the lift of `P`. -/
def StructureGroupoid.LocalInvariantProp.sheaf (hG : LocalInvariantProp G G' P) :
    TopCat.Sheaf (Type u) (TopCat.of M) 
goal: TopCat.Sheaf (Type u) (TopCat.of M)

full_name: StructureGroupoid.LocalInvariantProp.sheafHasCoeToFun
code: instance StructureGroupoid.LocalInvariantProp.sheafHasCoeToFun (hG : LocalInvariantProp G G' P)
    (U : (Opens (TopCat.of M))ᵒᵖ) : CoeFun ((hG.sheaf M M').val.obj U) fun _ => ↑(unop U) → M' 
goal: CoeFun ((StructureGroupoid.LocalInvariantProp.sheaf M M' hG).val.obj U) fun x => ↥(Opposite.unop U) → M'

full_name: StructureGroupoid.LocalInvariantProp.section_spec
code: theorem StructureGroupoid.LocalInvariantProp.section_spec (hG : LocalInvariantProp G G' P)
    (U : (Opens (TopCat.of M))ᵒᵖ) (f : (hG.sheaf M M').val.obj U) : ChartedSpace.LiftProp P f 
goal: ChartedSpace.LiftProp P ↑f
File: Mathlib/Geometry/Manifold/AnalyticManifold.lean

full_name: analyticGroupoid
code: /-- Given a model with corners `(E, H)`, we define the groupoid of analytic transformations of `H`
as the maps that are analytic and map interior to interior when read in `E` through `I`. We also
explicitly define that they are `C^∞` on the whole domain, since we are only requiring
analyticity on the interior of the domain. -/
def analyticGroupoid : StructureGroupoid H 
goal: StructureGroupoid H

full_name: ofSet_mem_analyticGroupoid
code: /-- An identity partial homeomorphism belongs to the analytic groupoid. -/
theorem ofSet_mem_analyticGroupoid {s : Set H} (hs : IsOpen s) :
    PartialHomeomorph.ofSet s hs ∈ analyticGroupoid I 
goal: PartialHomeomorph.ofSet s hs ∈ analyticGroupoid I

full_name: symm_trans_mem_analyticGroupoid
code: /-- The composition of a partial homeomorphism from `H` to `M` and its inverse belongs to
the analytic groupoid. -/
theorem symm_trans_mem_analyticGroupoid (e : PartialHomeomorph M H) :
    e.symm.trans e ∈ analyticGroupoid I 
goal: e.symm ≫ₕ e ∈ analyticGroupoid I

full_name: instClosedUnderRestrictionAnalyticGroupoid
code: /-- The analytic groupoid is closed under restriction. -/
instance : ClosedUnderRestriction (analyticGroupoid I) 
goal: ClosedUnderRestriction (analyticGroupoid I)

full_name: mem_analyticGroupoid_of_boundaryless
code: /-- The analytic groupoid on a boundaryless charted space modeled on a complete vector space
consists of the partial homeomorphisms which are analytic and have analytic inverse. -/
theorem mem_analyticGroupoid_of_boundaryless [CompleteSpace E] [I.Boundaryless]
    (e : PartialHomeomorph H H) :
    e ∈ analyticGroupoid I ↔ AnalyticOn 𝕜 (I ∘ e ∘ I.symm) (I '' e.source) ∧
    AnalyticOn 𝕜 (I ∘ e.symm ∘ I.symm) (I '' e.target) 
goal: e ∈ analyticGroupoid I ↔
  AnalyticOn 𝕜 (↑I ∘ ↑e ∘ ↑I.symm) (↑I '' e.source) ∧ AnalyticOn 𝕜 (↑I ∘ ↑e.symm ∘ ↑I.symm) (↑I '' e.target)
File: Mathlib/Geometry/Manifold/Algebra/Structures.lean

full_name: SmoothRing
code: /-- A smooth (semi)ring is a (semi)ring `R` where addition and multiplication are smooth.
If `R` is a ring, then negation is automatically smooth, as it is multiplication with `-1`. -/
class SmoothRing (I : ModelWithCorners 𝕜 E H) (R : Type*) [Semiring R] [TopologicalSpace R]
    [ChartedSpace H R] extends SmoothAdd I R : Prop where
  smooth_mul : Smooth (I.prod I) I fun p : R × R => p.1 * p.2
goal: Prop

full_name: SmoothRing.smooth_mul
code: /-- A smooth (semi)ring is a (semi)ring `R` where addition and multiplication are smooth.
If `R` is a ring, then negation is automatically smooth, as it is multiplication with `-1`. -/
class SmoothRing (I : ModelWithCorners 𝕜 E H) (R : Type*) [Semiring R] [TopologicalSpace R]
    [ChartedSpace H R] extends SmoothAdd I R : Prop where
  smooth_mul : Smooth (I.prod I) I fun p : R × R => p.1 * p.2
goal: Smooth (I.prod I) I fun p => p.1 * p.2

full_name: SmoothRing.toSmoothMul
code: instance (priority := 100) SmoothRing.toSmoothMul (I : ModelWithCorners 𝕜 E H) (R : Type*)
    [Semiring R] [TopologicalSpace R] [ChartedSpace H R] [h : SmoothRing I R] :
    SmoothMul I R 
goal: SmoothMul I R

full_name: SmoothRing.toLieAddGroup
code: instance (priority := 100) SmoothRing.toLieAddGroup (I : ModelWithCorners 𝕜 E H) (R : Type*)
    [Ring R] [TopologicalSpace R] [ChartedSpace H R] [SmoothRing I R] : LieAddGroup I R 
goal: LieAddGroup I R

full_name: fieldSmoothRing
code: instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 
goal: SmoothRing 𝓘(𝕜, 𝕜) 𝕜

full_name: topologicalSemiring_of_smooth
code: /-- A smooth (semi)ring is a topological (semi)ring. This is not an instance for technical reasons,
see note [Design choices about smooth algebraic structures]. -/
theorem topologicalSemiring_of_smooth [Semiring R] [SmoothRing I R] : TopologicalSemiring R 
goal: TopologicalSemiring R
File: Mathlib/Geometry/Manifold/Sheaf/LocallyRingedSpace.lean

full_name: smoothSheafCommRing.isUnit_stalk_iff
code: /-- The units of the stalk at `x` of the sheaf of smooth functions from `M` to `𝕜`, considered as a
sheaf of commutative rings, are the functions whose values at `x` are nonzero. -/
theorem smoothSheafCommRing.isUnit_stalk_iff {x : M}
    (f : (smoothSheafCommRing IM 𝓘(𝕜) M 𝕜).presheaf.stalk x) :
    IsUnit f ↔ f ∉ RingHom.ker (smoothSheafCommRing.eval IM 𝓘(𝕜) M 𝕜 x) 
goal: IsUnit f ↔ f ∉ RingHom.ker (smoothSheafCommRing.eval IM 𝓘(𝕜, 𝕜) M 𝕜 x)

full_name: smoothSheafCommRing.nonunits_stalk
code: /-- The non-units of the stalk at `x` of the sheaf of smooth functions from `M` to `𝕜`, considered
as a sheaf of commutative rings, are the functions whose values at `x` are zero. -/
theorem smoothSheafCommRing.nonunits_stalk (x : M) :
    nonunits ((smoothSheafCommRing IM 𝓘(𝕜) M 𝕜).presheaf.stalk x)
    = RingHom.ker (smoothSheafCommRing.eval IM 𝓘(𝕜) M 𝕜 x) 
goal: nonunits ↑((smoothSheafCommRing IM 𝓘(𝕜, 𝕜) M 𝕜).presheaf.stalk x) =
  ↑(RingHom.ker (smoothSheafCommRing.eval IM 𝓘(𝕜, 𝕜) M 𝕜 x))

full_name: smoothSheafCommRing.instLocalRing_stalk
code: /-- The stalks of the structure sheaf of a smooth manifold-with-corners are local rings. -/
instance smoothSheafCommRing.instLocalRing_stalk (x : M) :
    LocalRing ((smoothSheafCommRing IM 𝓘(𝕜) M 𝕜).presheaf.stalk x) 
goal: LocalRing ↑((smoothSheafCommRing IM 𝓘(𝕜, 𝕜) M 𝕜).presheaf.stalk x)

full_name: SmoothManifoldWithCorners.locallyRingedSpace
code: /-- A smooth manifold-with-corners can be considered as a locally ringed space. -/
def SmoothManifoldWithCorners.locallyRingedSpace : LocallyRingedSpace 
goal: AlgebraicGeometry.LocallyRingedSpace
File: Mathlib/Geometry/Manifold/ConformalGroupoid.lean

full_name: conformalPregroupoid
code: /-- The pregroupoid of conformal maps. -/
def conformalPregroupoid : Pregroupoid X 
goal: Pregroupoid X

full_name: conformalGroupoid
code: /-- The groupoid of conformal maps. -/
def conformalGroupoid : StructureGroupoid X 
goal: StructureGroupoid X
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Conformal.lean

full_name: InnerProductGeometry.IsConformalMap.preserves_angle
code: theorem IsConformalMap.preserves_angle {f' : E →L[ℝ] F} (h : IsConformalMap f') (u v : E) :
    angle (f' u) (f' v) = angle u v 
goal: InnerProductGeometry.angle (f' u) (f' v) = InnerProductGeometry.angle u v

full_name: InnerProductGeometry.ConformalAt.preserves_angle
code: /-- If a real differentiable map `f` is conformal at a point `x`,
    then it preserves the angles at that point. -/
theorem ConformalAt.preserves_angle {f : E → F} {x : E} {f' : E →L[ℝ] F} (h : HasFDerivAt f f' x)
    (H : ConformalAt f x) (u v : E) : angle (f' u) (f' v) = angle u v 
goal: InnerProductGeometry.angle (f' u) (f' v) = InnerProductGeometry.angle u v
File: Mathlib/Geometry/Euclidean/Sphere/Ptolemy.lean

full_name: EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical
code: /-- **Ptolemy’s Theorem**. -/
theorem mul_dist_add_mul_dist_eq_mul_dist_of_cospherical {a b c d p : P}
    (h : Cospherical ({a, b, c, d} : Set P)) (hapc : ∠ a p c = π) (hbpd : ∠ b p d = π) :
    dist a b * dist c d + dist b c * dist d a = dist a c * dist b d 
goal: dist a b * dist c d + dist b c * dist d a = dist a c * dist b d
File: Mathlib/Geometry/Euclidean/Sphere/Power.lean

full_name: InnerProductGeometry.mul_norm_eq_abs_sub_sq_norm
code: theorem mul_norm_eq_abs_sub_sq_norm {x y z : V} (h₁ : ∃ k : ℝ, k ≠ 1 ∧ x + y = k • (x - y))
    (h₂ : ‖z - y‖ = ‖z + y‖) : ‖x - y‖ * ‖x + y‖ = |‖z + y‖ ^ 2 - ‖z - x‖ ^ 2| 
goal: ‖x - y‖ * ‖x + y‖ = |‖z + y‖ ^ 2 - ‖z - x‖ ^ 2|

full_name: EuclideanGeometry.mul_dist_eq_abs_sub_sq_dist
code: /-- If `P` is a point on the line `AB` and `Q` is equidistant from `A` and `B`, then
`AP * BP = abs (BQ ^ 2 - PQ ^ 2)`. -/
theorem mul_dist_eq_abs_sub_sq_dist {a b p q : P} (hp : ∃ k : ℝ, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p))
    (hq : dist a q = dist b q) : dist a p * dist b p = |dist b q ^ 2 - dist p q ^ 2| 
goal: dist a p * dist b p = |dist b q ^ 2 - dist p q ^ 2|

full_name: EuclideanGeometry.mul_dist_eq_mul_dist_of_cospherical
code: /-- If `A`, `B`, `C`, `D` are cospherical and `P` is on both lines `AB` and `CD`, then
`AP * BP = CP * DP`. -/
theorem mul_dist_eq_mul_dist_of_cospherical {a b c d p : P} (h : Cospherical ({a, b, c, d} : Set P))
    (hapb : ∃ k₁ : ℝ, k₁ ≠ 1 ∧ b -ᵥ p = k₁ • (a -ᵥ p))
    (hcpd : ∃ k₂ : ℝ, k₂ ≠ 1 ∧ d -ᵥ p = k₂ • (c -ᵥ p)) :
    dist a p * dist b p = dist c p * dist d p 
goal: dist a p * dist b p = dist c p * dist d p

full_name: EuclideanGeometry.mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_pi
code: /-- **Intersecting Chords Theorem**. -/
theorem mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_pi {a b c d p : P}
    (h : Cospherical ({a, b, c, d} : Set P)) (hapb : ∠ a p b = π) (hcpd : ∠ c p d = π) :
    dist a p * dist b p = dist c p * dist d p 
goal: dist a p * dist b p = dist c p * dist d p

full_name: EuclideanGeometry.mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_zero
code: /-- **Intersecting Secants Theorem**. -/
theorem mul_dist_eq_mul_dist_of_cospherical_of_angle_eq_zero {a b c d p : P}
    (h : Cospherical ({a, b, c, d} : Set P)) (hab : a ≠ b) (hcd : c ≠ d) (hapb : ∠ a p b = 0)
    (hcpd : ∠ c p d = 0) : dist a p * dist b p = dist c p * dist d p 
goal: dist a p * dist b p = dist c p * dist d p
File: Mathlib/Logic/Lemmas.lean

full_name: iff_assoc
code: theorem iff_assoc {a b c : Prop} : ((a ↔ b) ↔ c) ↔ (a ↔ (b ↔ c)) 
goal: ((a ↔ b) ↔ c) ↔ (a ↔ (b ↔ c))

full_name: iff_left_comm
code: theorem iff_left_comm {a b c : Prop} : (a ↔ (b ↔ c)) ↔ (b ↔ (a ↔ c)) 
goal: (a ↔ (b ↔ c)) ↔ (b ↔ (a ↔ c))

full_name: iff_right_comm
code: theorem iff_right_comm {a b c : Prop} : ((a ↔ b) ↔ c) ↔ ((a ↔ c) ↔ b) 
goal: ((a ↔ b) ↔ c) ↔ ((a ↔ c) ↔ b)

full_name: dite_dite_distrib_left
code: theorem dite_dite_distrib_left {a : p → α} {b : ¬p → q → α} {c : ¬p → ¬q → α} :
    (dite p a fun hp ↦ dite q (b hp) (c hp)) =
      dite q (fun hq ↦ (dite p a) fun hp ↦ b hp hq) fun hq ↦ (dite p a) fun hp ↦ c hp hq 
goal: (dite p a fun hp => dite q (b hp) (c hp)) = if hq : q then dite p a fun hp => b hp hq else dite p a fun hp => c hp hq

full_name: dite_dite_distrib_right
code: theorem dite_dite_distrib_right {a : p → q → α} {b : p → ¬q → α} {c : ¬p → α} :
    dite p (fun hp ↦ dite q (a hp) (b hp)) c =
      dite q (fun hq ↦ dite p (fun hp ↦ a hp hq) c) fun hq ↦ dite p (fun hp ↦ b hp hq) c 
goal: dite p (fun hp => dite q (a hp) (b hp)) c =
  if hq : q then dite p (fun hp => a hp hq) c else dite p (fun hp => b hp hq) c

full_name: ite_dite_distrib_left
code: theorem ite_dite_distrib_left {a : α} {b : q → α} {c : ¬q → α} :
    ite p a (dite q b c) = dite q (fun hq ↦ ite p a <| b hq) fun hq ↦ ite p a <| c hq 
goal: (if p then a else dite q b c) = if hq : q then if p then a else b hq else if p then a else c hq

full_name: ite_dite_distrib_right
code: theorem ite_dite_distrib_right {a : q → α} {b : ¬q → α} {c : α} :
    ite p (dite q a b) c = dite q (fun hq ↦ ite p (a hq) c) fun hq ↦ ite p (b hq) c 
goal: (if p then dite q a b else c) = if hq : q then if p then a hq else c else if p then b hq else c

full_name: dite_ite_distrib_left
code: theorem dite_ite_distrib_left {a : p → α} {b : ¬p → α} {c : ¬p → α} :
    (dite p a fun hp ↦ ite q (b hp) (c hp)) = ite q (dite p a b) (dite p a c) 
goal: (dite p a fun hp => if q then b hp else c hp) = if q then dite p a b else dite p a c

full_name: dite_ite_distrib_right
code: theorem dite_ite_distrib_right {a : p → α} {b : p → α} {c : ¬p → α} :
    dite p (fun hp ↦ ite q (a hp) (b hp)) c = ite q (dite p a c) (dite p b c) 
goal: dite p (fun hp => if q then a hp else b hp) c = if q then dite p a c else dite p b c

full_name: ite_ite_distrib_left
code: theorem ite_ite_distrib_left : ite p a (ite q b c) = ite q (ite p a b) (ite p a c) 
goal: (if p then a else if q then b else c) = if q then if p then a else b else if p then a else c

full_name: ite_ite_distrib_right
code: theorem ite_ite_distrib_right : ite p (ite q a b) c = ite q (ite p a c) (ite p b c) 
goal: (if p then if q then a else b else c) = if q then if p then a else c else if p then b else c

full_name: Prop.forall
code: lemma Prop.forall {f : Prop → Prop} : (∀ p, f p) ↔ f True ∧ f False 
goal: (∀ (p : Prop), f p) ↔ f True ∧ f False

full_name: Prop.exists
code: lemma Prop.exists {f : Prop → Prop} : (∃ p, f p) ↔ f True ∨ f False 
goal: (∃ p, f p) ↔ f True ∨ f False