tasksource/leandojo huggingface dataset:
Theorem: Metric.lipschitz_infDist
File: Mathlib/Topology/MetricSpace/Closeds.lean

tactic: convert @LipschitzWith.uncurry α (NonemptyCompacts α) ℝ _ _ _
  (fun (x : α) (s : NonemptyCompacts α) => infDist x s) 1 1
  (fun s => lipschitz_infDist_pt ↑s) lipschitz_infDist_set
state_before: α : Type u
inst✝ : MetricSpace α
⊢ LipschitzWith 2 fun p => infDist p.fst ↑p.snd

tactic: norm_num
state_before: case h.e'_5
α : Type u
inst✝ : MetricSpace α
⊢ 2 = 1 + 1
Theorem: Ordinal.lift_isLimit
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [lift_zero] using @lift_inj o 0
state_before: α : Type ?u.91752
β : Type ?u.91755
γ : Type ?u.91758
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
⊢ lift o = 0 ↔ o = 0

tactic: simpa only [lift_succ] using H _ (lift_lt.2 h)
state_before: α : Type ?u.91752
β : Type ?u.91755
γ : Type ?u.91758
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
H : ∀ (a : Ordinal), a < lift o → succ a < lift o
a : Ordinal
h : a < o
⊢ lift (succ a) < lift o

tactic: obtain ⟨a', rfl⟩ := lift_down h.le
state_before: α : Type ?u.91752
β : Type ?u.91755
γ : Type ?u.91758
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
H : ∀ (a : Ordinal), a < o → succ a < o
a : Ordinal
h : a < lift o
⊢ succ a < lift o

tactic: rw [← lift_succ, lift_lt]
state_before: case intro
α : Type ?u.91752
β : Type ?u.91755
γ : Type ?u.91758
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
H : ∀ (a : Ordinal), a < o → succ a < o
a' : Ordinal
h : lift a' < lift o
⊢ succ (lift a') < lift o

tactic: exact H a' (lift_lt.1 h)
state_before: case intro
α : Type ?u.91752
β : Type ?u.91755
γ : Type ?u.91758
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
H : ∀ (a : Ordinal), a < o → succ a < o
a' : Ordinal
h : lift a' < lift o
⊢ succ a' < o
Theorem: Localization.mk_int_cast
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: simpa using @mk_algebraMap R _ M ℤ _ _ m
state_before: R : Type u_1
inst✝³ : CommRing R
M : Submonoid R
S : Type ?u.3005121
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Type ?u.3005358
inst✝ : CommRing P
m : ℤ
⊢ mk (↑m) 1 = ↑m
Theorem: Equiv.Perm.sameCycle_zpow_right
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: rw [sameCycle_comm, sameCycle_zpow_left, sameCycle_comm]
state_before: ι : Type ?u.112272
α : Type u_1
β : Type ?u.112278
f g : Perm α
p : α → Prop
x y z : α
n : ℤ
⊢ SameCycle f x (↑(f ^ n) y) ↔ SameCycle f x y
Theorem: residual_of_dense_Gδ
File: Mathlib/Topology/GDelta.lean

tactic: rcases ho with ⟨T, To, Tct, rfl⟩
state_before: α : Type u_1
β : Type ?u.15710
γ : Type ?u.15713
ι : Type ?u.15716
inst✝ : TopologicalSpace α
s : Set α
ho : IsGδ s
hd : Dense s
⊢ s ∈ residual α

tactic: exact
  (countable_sInter_mem Tct).mpr fun t tT =>
    residual_of_dense_open (To t tT) (hd.mono (sInter_subset_of_mem tT))
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.15710
γ : Type ?u.15713
ι : Type ?u.15716
inst✝ : TopologicalSpace α
T : Set (Set α)
To : ∀ (t : Set α), t ∈ T → IsOpen t
Tct : Set.Countable T
hd : Dense (⋂₀ T)
⊢ ⋂₀ T ∈ residual α
Theorem: tendsto_inv_nhdsWithin_Iio
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simp [tendsto_principal_principal]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f : α → G
s : Set α
x : α
inst✝² : TopologicalSpace H
inst✝¹ : OrderedCommGroup H
inst✝ : ContinuousInv H
a : H
⊢ Tendsto (fun a => a⁻¹) (𝓟 (Iio a)) (𝓟 (Ioi a⁻¹))
Theorem: Real.Angle.toReal_neg_iff_sign_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [sign, ← sin_toReal, sign_eq_neg_one_iff]
state_before: θ : Angle
⊢ toReal θ < 0 ↔ sign θ = -1

tactic: rcases lt_trichotomy θ.toReal 0 with (h | h | h)
state_before: θ : Angle
⊢ toReal θ < 0 ↔ Real.sin (toReal θ) < 0

tactic: exact ⟨fun _ => Real.sin_neg_of_neg_of_neg_pi_lt h (neg_pi_lt_toReal θ), fun _ => h⟩
state_before: case inl
θ : Angle
h : toReal θ < 0
⊢ toReal θ < 0 ↔ Real.sin (toReal θ) < 0

tactic: simp [h]
state_before: case inr.inl
θ : Angle
h : toReal θ = 0
⊢ toReal θ < 0 ↔ Real.sin (toReal θ) < 0

tactic: exact
  ⟨fun hn => False.elim (h.asymm hn), fun hn =>
    False.elim (hn.not_le (sin_nonneg_of_nonneg_of_le_pi h.le (toReal_le_pi θ)))⟩
state_before: case inr.inr
θ : Angle
h : 0 < toReal θ
⊢ toReal θ < 0 ↔ Real.sin (toReal θ) < 0
Theorem: Real.smoothTransition.one_of_one_le
File: Mathlib/Analysis/Calculus/BumpFunctionInner.lean

tactic: rw [zero_of_nonpos (sub_nonpos.2 h), add_zero]
state_before: x : ℝ
h : 1 ≤ x
⊢ expNegInvGlue x = expNegInvGlue x + expNegInvGlue (1 - x)
Theorem: CategoryTheory.comp_dite
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: aesop
state_before: C : Type u
inst✝¹ : Category C
X✝ Y✝ Z✝ : C
P : Prop
inst✝ : Decidable P
X Y Z : C
f : X ⟶ Y
g : P → (Y ⟶ Z)
g' : ¬P → (Y ⟶ Z)
⊢ (f ≫ if h : P then g h else g' h) = if h : P then f ≫ g h else f ≫ g' h
Theorem: ProbabilityTheory.condCount_union
File: Mathlib/Probability/CondCount.lean

tactic: rw [condCount, cond_apply _ hs.measurableSet, cond_apply _ hs.measurableSet,
  cond_apply _ hs.measurableSet, Set.inter_union_distrib_left, measure_union, mul_add]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
htu : Disjoint t u
⊢ ↑↑(condCount s) (t ∪ u) = ↑↑(condCount s) t + ↑↑(condCount s) u

tactic: exacts [htu.mono inf_le_right inf_le_right, (hs.inter_of_left _).measurableSet]
state_before: case hd
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
htu : Disjoint t u
⊢ Disjoint (s ∩ t) (s ∩ u)

case h
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
htu : Disjoint t u
⊢ MeasurableSet (s ∩ u)
Theorem: List.sublistsLenAux_append
File: Mathlib/Data/List/Sublists.lean

tactic: unfold sublistsLenAux
state_before: α✝ : Type u
β✝ : Type v
γ✝ : Type w
α : Type u_1
β : Type u_2
γ : Type u_3
l : List α
f : List α → β
g : β → γ
r : List β
s : List γ
⊢ sublistsLenAux 0 l (g ∘ f) (map g r ++ s) = map g (sublistsLenAux 0 l f r) ++ s

tactic: simp
state_before: α✝ : Type u
β✝ : Type v
γ✝ : Type w
α : Type u_1
β : Type u_2
γ : Type u_3
l : List α
f : List α → β
g : β → γ
r : List β
s : List γ
⊢ (g ∘ f) [] :: (map g r ++ s) = map g (f [] :: r) ++ s

tactic: unfold sublistsLenAux
state_before: α✝ : Type u
β✝ : Type v
γ✝ : Type w
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
a : α
l : List α
f : List α → β
g : β → γ
r : List β
s : List γ
⊢ sublistsLenAux (n + 1) (a :: l) (g ∘ f) (map g r ++ s) = map g (sublistsLenAux (n + 1) (a :: l) f r) ++ s

tactic: simp only [show (g ∘ f) ∘ List.cons a = g ∘ f ∘ List.cons a by rfl, sublistsLenAux_append,
  sublistsLenAux_append]
state_before: α✝ : Type u
β✝ : Type v
γ✝ : Type w
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
a : α
l : List α
f : List α → β
g : β → γ
r : List β
s : List γ
⊢ sublistsLenAux (Nat.add n 0 + 1) l (g ∘ f) (sublistsLenAux (Nat.add n 0) l ((g ∘ f) ∘ cons a) (map g r ++ s)) =
    map g (sublistsLenAux (Nat.add n 0 + 1) l f (sublistsLenAux (Nat.add n 0) l (f ∘ cons a) r)) ++ s

tactic: rfl
state_before: α✝ : Type u
β✝ : Type v
γ✝ : Type w
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
a : α
l : List α
f : List α → β
g : β → γ
r : List β
s : List γ
⊢ (g ∘ f) ∘ cons a = g ∘ f ∘ cons a
Theorem: FP.Float.Zero.valid
File: Mathlib/Data/FP/Basic.lean

tactic: rw [add_sub_assoc]
state_before: C : FloatCfg
⊢ emin ≤ emin + ↑prec - 1

tactic: apply le_add_of_nonneg_right
state_before: C : FloatCfg
⊢ emin ≤ emin + (↑prec - 1)

tactic: apply sub_nonneg_of_le
state_before: case h
C : FloatCfg
⊢ 0 ≤ ↑prec - 1

tactic: apply Int.ofNat_le_ofNat_of_le
state_before: case h.a
C : FloatCfg
⊢ 1 ≤ ↑prec

tactic: exact C.precPos
state_before: case h.a.a
C : FloatCfg
⊢ 1 ≤ prec

tactic: rw [← Int.ofNat_le] at this
state_before: C : FloatCfg
this : prec ≤ 2 * emax
⊢ emin + ↑prec - 1 ≤ ↑emax

tactic: rw [← sub_nonneg] at *
state_before: C : FloatCfg
this : ↑prec ≤ ↑(2 * emax)
⊢ emin + ↑prec - 1 ≤ ↑emax

tactic: simp only [emin, emax] at *
state_before: C : FloatCfg
this✝ : ↑prec ≤ ↑(2 * emax)
this : 0 ≤ ↑(2 * emax) - ↑prec
⊢ 0 ≤ ↑emax - (emin + ↑prec - 1)

tactic: ring_nf
state_before: C : FloatCfg
this✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ ↑FloatCfg.emax - (1 - ↑FloatCfg.emax + ↑prec - 1)

tactic: rw [mul_comm]
state_before: C : FloatCfg
this✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ ↑FloatCfg.emax * 2 - ↑prec

tactic: assumption
state_before: C : FloatCfg
this✝ : ↑prec ≤ ↑(2 * FloatCfg.emax)
this : 0 ≤ ↑(2 * FloatCfg.emax) - ↑prec
⊢ 0 ≤ 2 * ↑FloatCfg.emax - ↑prec

tactic: decide
state_before: C : FloatCfg
⊢ 0 < 2

tactic: (rw [max_eq_right]; simp [sub_eq_add_neg])
state_before: C : FloatCfg
⊢ emin = max (emin + ↑(Nat.size 0) - ↑prec) emin

tactic: rw [max_eq_right]
state_before: C : FloatCfg
⊢ emin = max (emin + ↑(Nat.size 0) - ↑prec) emin

tactic: simp [sub_eq_add_neg]
state_before: C : FloatCfg
⊢ emin + ↑(Nat.size 0) - ↑prec ≤ emin
Theorem: hasDerivAt_gronwallBound
File: Mathlib/Analysis/ODE/Gronwall.lean

tactic: by_cases hK : K = 0
state_before: E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x

tactic: subst K
state_before: case pos
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
hK : K = 0
⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x

tactic: simp only [gronwallBound_K0, MulZeroClass.zero_mul, zero_add]
state_before: case pos
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ ε x : ℝ
⊢ HasDerivAt (gronwallBound δ 0 ε) (0 * gronwallBound δ 0 ε x + ε) x

tactic: convert ((hasDerivAt_id x).const_mul ε).const_add δ
state_before: case pos
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ ε x : ℝ
⊢ HasDerivAt (fun x => δ + ε * x) ε x

tactic: rw [mul_one]
state_before: case h.e'_7
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ ε x : ℝ
⊢ ε = ε * 1

tactic: simp only [gronwallBound_of_K_ne_0 hK]
state_before: case neg
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
hK : ¬K = 0
⊢ HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x

tactic: convert (((hasDerivAt_id x).const_mul K).exp.const_mul δ).add
  ((((hasDerivAt_id x).const_mul K).exp.sub_const 1).const_mul (ε / K)) using 1
state_before: case neg
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
hK : ¬K = 0
⊢ HasDerivAt (fun x => δ * exp (K * x) + ε / K * (exp (K * x) - 1))
    (K * (δ * exp (K * x) + ε / K * (exp (K * x) - 1)) + ε) x

tactic: simp only [id, mul_add, (mul_assoc _ _ _).symm, mul_comm _ K, mul_div_cancel' _ hK]
state_before: case h.e'_7
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
hK : ¬K = 0
⊢ K * (δ * exp (K * x) + ε / K * (exp (K * x) - 1)) + ε =
    δ * (exp (K * id x) * (K * 1)) + ε / K * (exp (K * id x) * (K * 1))

tactic: ring
state_before: case h.e'_7
E : Type ?u.1814
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type ?u.1910
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
δ K ε x : ℝ
hK : ¬K = 0
⊢ K * δ * exp (K * x) + ε * (exp (K * x) - 1) + ε = K * δ * exp (K * x) * 1 + ε * exp (K * x) * 1
Theorem: Ideal.comap_ne_top
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [mem_comap, map_one]
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : Semiring R
inst✝ : Semiring S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
hK : K ≠ ⊤
⊢ ¬1 ∈ comap f K

tactic: exact (ne_top_iff_one _).1 hK
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : Semiring R
inst✝ : Semiring S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
hK : K ≠ ⊤
⊢ ¬1 ∈ K
Theorem: TypeVec.const_nil
File: Mathlib/Data/TypeVec.lean

tactic: ext i : 1
state_before: n : ℕ
β : Type u_1
x : β
α : TypeVec 0
⊢ TypeVec.const x α = nilFun

tactic: cases i
state_before: case a
n : ℕ
β : Type u_1
x : β
α : TypeVec 0
i : Fin2 0
⊢ TypeVec.const x α i = nilFun i
Theorem: List.countp_eq_countp_filter_add
File: Mathlib/Data/List/Perm.lean

tactic: rw [← countp_append]
state_before: α : Type uu
β : Type vv
l₁ l₂ l : List α
p q : α → Bool
⊢ countp p l = countp p (filter q l) + countp p (filter (fun a => decide ¬q a = true) l)

tactic: exact Perm.countp_eq _ (filter_append_perm _ _).symm
state_before: α : Type uu
β : Type vv
l₁ l₂ l : List α
p q : α → Bool
⊢ countp p l = countp p (filter q l ++ filter (fun a => decide ¬q a = true) l)
Theorem: Seminorm.closedBall_smul
File: Mathlib/Analysis/Seminorm.lean

tactic: ext
state_before: R : Type ?u.850084
R' : Type ?u.850087
𝕜 : Type u_1
𝕜₂ : Type ?u.850093
𝕜₃ : Type ?u.850096
𝕝 : Type ?u.850099
E : Type u_2
E₂ : Type ?u.850105
E₃ : Type ?u.850108
F : Type ?u.850111
G : Type ?u.850114
ι : Type ?u.850117
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x✝ y : E
r✝ : ℝ
p : Seminorm 𝕜 E
c : ℝ≥0
hc : 0 < c
r : ℝ
x : E
⊢ closedBall (c • p) x r = closedBall p x (r / ↑c)

tactic: rw [mem_closedBall, mem_closedBall, smul_apply, NNReal.smul_def, smul_eq_mul, mul_comm,
  le_div_iff (NNReal.coe_pos.mpr hc)]
state_before: case h
R : Type ?u.850084
R' : Type ?u.850087
𝕜 : Type u_1
𝕜₂ : Type ?u.850093
𝕜₃ : Type ?u.850096
𝕝 : Type ?u.850099
E : Type u_2
E₂ : Type ?u.850105
E₃ : Type ?u.850108
F : Type ?u.850111
G : Type ?u.850114
ι : Type ?u.850117
inst✝² : SeminormedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : SMul 𝕜 E
p✝ : Seminorm 𝕜 E
x✝¹ y : E
r✝ : ℝ
p : Seminorm 𝕜 E
c : ℝ≥0
hc : 0 < c
r : ℝ
x x✝ : E
⊢ x✝ ∈ closedBall (c • p) x r ↔ x✝ ∈ closedBall p x (r / ↑c)
Theorem: AlgebraicTopology.DoldKan.QInfty_f_0
File: Mathlib/AlgebraicTopology/DoldKan/PInfty.lean

tactic: dsimp [QInfty]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ HomologicalComplex.Hom.f QInfty 0 = 0

tactic: simp only [sub_self]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ 𝟙 (X.obj [0].op) - 𝟙 (X.obj [0].op) = 0
Theorem: Nat.factorization_factorial_eq_zero_of_lt
File: Mathlib/Data/Nat/Choose/Factorization.lean

tactic: induction' n with n hn
state_before: p n k : ℕ
h : n < p
⊢ ↑(factorization n !) p = 0

tactic: rw [factorial_succ, factorization_mul n.succ_ne_zero n.factorial_ne_zero, Finsupp.coe_add,
  Pi.add_apply, hn (lt_of_succ_lt h), add_zero, factorization_eq_zero_of_lt h]
state_before: case succ
p n✝ k : ℕ
h✝ : n✝ < p
n : ℕ
hn : n < p → ↑(factorization n !) p = 0
h : succ n < p
⊢ ↑(factorization (succ n)!) p = 0

tactic: simp
state_before: case zero
p n k : ℕ
h✝ : n < p
h : zero < p
⊢ ↑(factorization zero !) p = 0
Theorem: Complex.conj_cpow
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [conj_cpow_eq_ite, if_neg hx]
state_before: x n : ℂ
hx : arg x ≠ π
⊢ ↑(starRingEnd ℂ) x ^ n = ↑(starRingEnd ℂ) (x ^ ↑(starRingEnd ℂ) n)
Theorem: Disjoint.sup_sdiff_cancel_left
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sup_sdiff, sdiff_self, bot_sup_eq, h.sdiff_eq_right]
state_before: ι : Type ?u.140145
α : Type u_1
β : Type ?u.140151
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
h : Disjoint a b
⊢ (a ⊔ b) \ a = b
Theorem: norm_sub_mul_self
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: repeat' rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2442591
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * ↑re (inner x y) + ‖y‖ * ‖y‖

tactic: exact norm_sub_sq _ _
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2442591
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2

tactic: rw [← sq (M := ℝ)]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2442591
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2
Theorem: mem_nhds_prod_iff
File: Mathlib/Topology/Constructions.lean

tactic: rw [nhds_prod_eq, mem_prod_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.34864
δ : Type ?u.34867
ε : Type ?u.34870
ζ : Type ?u.34873
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
a : α
b : β
s : Set (α × β)
⊢ s ∈ 𝓝 (a, b) ↔ ∃ u, u ∈ 𝓝 a ∧ ∃ v, v ∈ 𝓝 b ∧ u ×ˢ v ⊆ s
Theorem: OrthonormalBasis.span_apply
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: simp only [OrthonormalBasis.span, Basis.span_apply, LinearIsometryEquiv.ofEq_symm,
  OrthonormalBasis.map_apply, OrthonormalBasis.coe_mk, LinearIsometryEquiv.coe_ofEq_apply,
  comp_apply]
state_before: ι : Type ?u.1215956
ι' : Type u_3
𝕜 : Type u_2
inst✝¹⁰ : IsROrC 𝕜
E : Type u_1
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type ?u.1215988
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type ?u.1216006
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type ?u.1216026
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : Fintype ι
v : ι → E
inst✝ : DecidableEq E
v' : ι' → E
h : Orthonormal 𝕜 v'
s : Finset ι'
i : { x // x ∈ s }
⊢ ↑(↑(OrthonormalBasis.span h s) i) = v' ↑i
Theorem: QuotientGroup.out'_conj_pow_minimalPeriod_mem
File: Mathlib/GroupTheory/GroupAction/Quotient.lean

tactic: rw [mul_assoc, ← QuotientGroup.eq', QuotientGroup.out_eq', ← smul_eq_mul, Quotient.mk_smul_out',
  eq_comm, pow_smul_eq_iff_minimalPeriod_dvd]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : Group α
inst✝¹ : Monoid β
inst✝ : MulAction β α
H : Subgroup α
a : α
q : α ⧸ H
⊢ (Quotient.out' q)⁻¹ * a ^ minimalPeriod ((fun x x_1 => x • x_1) a) q * Quotient.out' q ∈ H
Theorem: Int.dvd_of_mul_dvd_mul_right
File: Mathlib/Data/Int/GCD.lean

tactic: rw [mul_comm i k, mul_comm j k] at H
state_before: i j k : ℤ
k_non_zero : k ≠ 0
H : i * k ∣ j * k
⊢ i ∣ j

tactic: exact dvd_of_mul_dvd_mul_left k_non_zero H
state_before: i j k : ℤ
k_non_zero : k ≠ 0
H : k * i ∣ k * j
⊢ i ∣ j
Theorem: Monoid.exponent_dvd_of_forall_pow_eq_one
File: Mathlib/GroupTheory/Exponent.lean

tactic: rcases n.eq_zero_or_pos with (rfl | hpos)
state_before: G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
⊢ exponent G ∣ n

tactic: apply Nat.dvd_of_mod_eq_zero
state_before: case inr
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
⊢ exponent G ∣ n

tactic: by_contra h
state_before: case inr.H
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
⊢ n % exponent G = 0

tactic: have h₁ := Nat.pos_of_ne_zero h
state_before: case inr.H
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
⊢ False

tactic: have h₂ : n % exponent G < exponent G := Nat.mod_lt _ (exponent_pos_of_exists n hpos hG)
state_before: case inr.H
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
⊢ False

tactic: have h₃ : exponent G ≤ n % exponent G := by
  apply exponent_min' _ h₁
  simp_rw [← pow_eq_mod_exponent]
  exact hG
state_before: case inr.H
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
h₂ : n % exponent G < exponent G
⊢ False

tactic: linarith
state_before: case inr.H
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
h₂ : n % exponent G < exponent G
h₃ : exponent G ≤ n % exponent G
⊢ False

tactic: exact dvd_zero _
state_before: case inl
G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
hG : ∀ (g : G), g ^ 0 = 1
⊢ exponent G ∣ 0

tactic: apply exponent_min' _ h₁
state_before: G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
h₂ : n % exponent G < exponent G
⊢ exponent G ≤ n % exponent G

tactic: simp_rw [← pow_eq_mod_exponent]
state_before: G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
h₂ : n % exponent G < exponent G
⊢ ∀ (g : G), g ^ (n % exponent G) = 1

tactic: exact hG
state_before: G✝ : Type u
inst✝¹ : Monoid G✝
G : Type u_1
inst✝ : Monoid G
n : ℕ
hG : ∀ (g : G), g ^ n = 1
hpos : n > 0
h : ¬n % exponent G = 0
h₁ : 0 < n % exponent G
h₂ : n % exponent G < exponent G
⊢ ∀ (g : G), g ^ n = 1
Theorem: Nat.iInf_of_empty
File: Mathlib/Data/Nat/Lattice.lean

tactic: rw [iInf_of_empty', sInf_empty]
state_before: ι : Sort u_1
inst✝ : IsEmpty ι
f : ι → ℕ
⊢ iInf f = 0
Theorem: AddMonoidAlgebra.lift_of
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: rw [of_apply, ← lift_symm_apply, Equiv.symm_apply_apply]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.2675847
inst✝⁵ : CommSemiring k
inst✝⁴ : AddMonoid G
A : Type u₃
inst✝³ : Semiring A
inst✝² : Algebra k A
B : Type ?u.2675884
inst✝¹ : Semiring B
inst✝ : Algebra k B
F : Multiplicative G →* A
x : Multiplicative G
⊢ ↑(↑(lift k G A) F) (↑(of k G) x) = ↑F x
Theorem: holderOnWith_singleton
File: Mathlib/Topology/MetricSpace/Holder.lean

tactic: rintro a (rfl : a = x) b (rfl : b = a)
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.127575
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
x : X
⊢ HolderOnWith C r f {x}

tactic: rw [edist_self]
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.127575
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
b : X
⊢ edist (f b) (f b) ≤ ↑C * edist b b ^ ↑r

tactic: exact zero_le _
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.127575
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
b : X
⊢ 0 ≤ ↑C * edist b b ^ ↑r