1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: map_mem_perfectClosure_iff
File: Mathlib/FieldTheory/PurelyInseparable.lean

tactic: simp_rw [mem_perfectClosure_iff]
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
⊢ i x ∈ perfectClosure F K ↔ x ∈ perfectClosure F E
state_after: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
⊢ (∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range) ↔ ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range

tactic: refine ⟨fun ⟨n, y, h⟩ ↦ ⟨n, y, ?_⟩, fun ⟨n, y, h⟩ ↦ ⟨n, y, ?_⟩⟩
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
⊢ (∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range) ↔ ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range
state_after: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range
n : ℕ
y : F
h : (algebraMap F K) y = i x ^ ringExpChar F ^ n
⊢ (algebraMap F E) y = x ^ ringExpChar F ^ n

case refine_2
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range
n : ℕ
y : F
h : (algebraMap F E) y = x ^ ringExpChar F ^ n
⊢ (algebraMap F K) y = i x ^ ringExpChar F ^ n

tactic: simpa only [AlgHom.commutes, map_pow] using congr_arg i h
state_before: case refine_2
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, x ^ ringExpChar F ^ n ∈ (algebraMap F E).range
n : ℕ
y : F
h : (algebraMap F E) y = x ^ ringExpChar F ^ n
⊢ (algebraMap F K) y = i x ^ ringExpChar F ^ n
state_after: no goals

tactic: apply_fun i using i.injective
state_before: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range
n : ℕ
y : F
h : (algebraMap F K) y = i x ^ ringExpChar F ^ n
⊢ (algebraMap F E) y = x ^ ringExpChar F ^ n
state_after: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range
n : ℕ
y : F
h : (algebraMap F K) y = i x ^ ringExpChar F ^ n
⊢ i ((algebraMap F E) y) = i (x ^ ringExpChar F ^ n)

tactic: rwa [AlgHom.commutes, map_pow]
state_before: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
i : E →ₐ[F] K
x : E
x✝ : ∃ n, i x ^ ringExpChar F ^ n ∈ (algebraMap F K).range
n : ℕ
y : F
h : (algebraMap F K) y = i x ^ ringExpChar F ^ n
⊢ i ((algebraMap F E) y) = i (x ^ ringExpChar F ^ n)
state_after: no goals
Theorem: UniformFun.gc
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

tactic: intro 𝓐 𝓕
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
⊢ GaloisConnection (fun 𝓐 => map (UniformFun.phi α β) (𝓐 ×ˢ ⊤)) fun 𝓕 => UniformFun.filter α β 𝓕
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
𝓐 : Filter ((α →ᵤ β) × (α →ᵤ β))
𝓕 : Filter (β × β)
⊢ (fun 𝓐 => map (UniformFun.phi α β) (𝓐 ×ˢ ⊤)) 𝓐 ≤ 𝓕 ↔ 𝓐 ≤ (fun 𝓕 => UniformFun.filter α β 𝓕) 𝓕

tactic: symm
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
𝓐 : Filter ((α →ᵤ β) × (α →ᵤ β))
𝓕 : Filter (β × β)
⊢ (fun 𝓐 => map (UniformFun.phi α β) (𝓐 ×ˢ ⊤)) 𝓐 ≤ 𝓕 ↔ 𝓐 ≤ (fun 𝓕 => UniformFun.filter α β 𝓕) 𝓕
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
𝓐 : Filter ((α →ᵤ β) × (α →ᵤ β))
𝓕 : Filter (β × β)
⊢ 𝓐 ≤ (fun 𝓕 => UniformFun.filter α β 𝓕) 𝓕 ↔ (fun 𝓐 => map (UniformFun.phi α β) (𝓐 ×ˢ ⊤)) 𝓐 ≤ 𝓕

tactic: calc
  𝓐 ≤ UniformFun.filter α β 𝓕 ↔ (UniformFun.basis α β 𝓕).sets ⊆ 𝓐.sets := by
    rw [UniformFun.filter, ← FilterBasis.generate, le_generate_iff]
  _ ↔ ∀ U ∈ 𝓕, UniformFun.gen α β U ∈ 𝓐 := image_subset_iff
  _ ↔ ∀ U ∈ 𝓕,
        { uv | ∀ x, (uv, x) ∈ { t : ((α →ᵤ β) × (α →ᵤ β)) × α | (t.1.1 t.2, t.1.2 t.2) ∈ U } } ∈
          𝓐 :=
    Iff.rfl
  _ ↔ ∀ U ∈ 𝓕,
        { uvx : ((α →ᵤ β) × (α →ᵤ β)) × α | (uvx.1.1 uvx.2, uvx.1.2 uvx.2) ∈ U } ∈
          𝓐 ×ˢ (⊤ : Filter α) :=
    forall₂_congr fun U _hU => mem_prod_top.symm
  _ ↔ lowerAdjoint 𝓐 ≤ 𝓕 := Iff.rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
𝓐 : Filter ((α →ᵤ β) × (α →ᵤ β))
𝓕 : Filter (β × β)
⊢ 𝓐 ≤ (fun 𝓕 => UniformFun.filter α β 𝓕) 𝓕 ↔ (fun 𝓐 => map (UniformFun.phi α β) (𝓐 ×ˢ ⊤)) 𝓐 ≤ 𝓕
state_after: no goals

tactic: rw [UniformFun.filter, ← FilterBasis.generate, le_generate_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
𝓐 : Filter ((α →ᵤ β) × (α →ᵤ β))
𝓕 : Filter (β × β)
⊢ 𝓐 ≤ UniformFun.filter α β 𝓕 ↔ (UniformFun.basis α β 𝓕).sets ⊆ 𝓐.sets
state_after: no goals
Theorem: LiouvilleNumber.remainder_pos
File: Mathlib/NumberTheory/Liouville/LiouvilleNumber.lean

tactic: positivity
state_before: m : ℝ
hm : 1 < m
k x✝ : ℕ
⊢ 0 ≤ 1 / m ^ (x✝ + (k + 1))!
state_after: no goals

tactic: positivity
state_before: m : ℝ
hm : 1 < m
k : ℕ
⊢ 0 < 1 / m ^ (0 + (k + 1))!
state_after: no goals
Theorem: Equiv.Perm.subtypePerm_pow
File: Mathlib/GroupTheory/Perm/Basic.lean

tactic: induction' n with n ih
state_before: α : Type u
β : Type v
p : α → Prop
f✝ f : Perm α
n : ℕ
hf : ∀ (x : α), p x ↔ p (f x)
⊢ f.subtypePerm hf ^ n = (f ^ n).subtypePerm ⋯
state_after: case zero
α : Type u
β : Type v
p : α → Prop
f✝ f : Perm α
hf : ∀ (x : α), p x ↔ p (f x)
⊢ f.subtypePerm hf ^ 0 = (f ^ 0).subtypePerm ⋯

case succ
α : Type u
β : Type v
p : α → Prop
f✝ f : Perm α
hf : ∀ (x : α), p x ↔ p (f x)
n : ℕ
ih : f.subtypePerm hf ^ n = (f ^ n).subtypePerm ⋯
⊢ f.subtypePerm hf ^ (n + 1) = (f ^ (n + 1)).subtypePerm ⋯

tactic: simp
state_before: case zero
α : Type u
β : Type v
p : α → Prop
f✝ f : Perm α
hf : ∀ (x : α), p x ↔ p (f x)
⊢ f.subtypePerm hf ^ 0 = (f ^ 0).subtypePerm ⋯
state_after: no goals

tactic: simp_rw [pow_succ', ih, subtypePerm_mul]
state_before: case succ
α : Type u
β : Type v
p : α → Prop
f✝ f : Perm α
hf : ∀ (x : α), p x ↔ p (f x)
n : ℕ
ih : f.subtypePerm hf ^ n = (f ^ n).subtypePerm ⋯
⊢ f.subtypePerm hf ^ (n + 1) = (f ^ (n + 1)).subtypePerm ⋯
state_after: no goals
Theorem: lowerSemicontinuousAt_iff_le_liminf
File: Mathlib/Topology/Semicontinuous.lean

tactic: rw [← lowerSemicontinuousWithinAt_univ_iff, lowerSemicontinuousWithinAt_iff_le_liminf,
  ← nhdsWithin_univ]
state_before: α : Type u_1
inst✝³ : TopologicalSpace α
β : Type u_2
inst✝² : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
γ : Type u_3
inst✝¹ : CompleteLinearOrder γ
inst✝ : DenselyOrdered γ
f : α → γ
⊢ LowerSemicontinuousAt f x ↔ f x ≤ liminf f (𝓝 x)
state_after: no goals
Theorem: Cardinal.mk_ord_out
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal.{u_3}
⊢ #(Quotient.out c.ord).α = c
state_after: no goals
Theorem: Nat.modEq_zero_iff_dvd
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [ModEq, zero_mod, dvd_iff_mod_eq_zero]
state_before: m n a b c d : ℕ
⊢ a ≡ 0 [MOD n] ↔ n ∣ a
state_after: no goals
Theorem: Finset.pow_eq_prod_const
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simp
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
b : β
⊢ ∀ (n : ℕ), b ^ n = ∏ _k ∈ range n, b
state_after: no goals
Theorem: RCLike.normSq_neg
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: simp only [normSq_eq_def', norm_neg]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z✝ z : K
⊢ normSq (-z) = normSq z
state_after: no goals
Theorem: ZMod.eq_one_iff_odd
File: Mathlib/Data/ZMod/Parity.lean

tactic: rw [← @Nat.cast_one (ZMod 2), ZMod.eq_iff_modEq_nat, Nat.odd_iff, Nat.ModEq]
state_before: n : ℕ
⊢ ↑n = 1 ↔ Odd n
state_after: no goals
Theorem: BoundedSMul.of_norm_smul_le
File: Mathlib/Analysis/Normed/MulAction.lean

tactic: simpa [smul_sub, dist_eq_norm] using h a (b₁ - b₂)
state_before: α : Type u_1
β : Type u_2
inst✝² : SeminormedRing α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : Module α β
h : ∀ (r : α) (x : β), ‖r • x‖ ≤ ‖r‖ * ‖x‖
a : α
b₁ b₂ : β
⊢ dist (a • b₁) (a • b₂) ≤ dist a 0 * dist b₁ b₂
state_after: no goals

tactic: simpa [sub_smul, dist_eq_norm] using h (a₁ - a₂) b
state_before: α : Type u_1
β : Type u_2
inst✝² : SeminormedRing α
inst✝¹ : SeminormedAddCommGroup β
inst✝ : Module α β
h : ∀ (r : α) (x : β), ‖r • x‖ ≤ ‖r‖ * ‖x‖
a₁ a₂ : α
b : β
⊢ dist (a₁ • b) (a₂ • b) ≤ dist a₁ a₂ * dist b 0
state_after: no goals
Theorem: CategoryTheory.NatIso.isIso_of_isIso_app
File: Mathlib/CategoryTheory/NatIso.lean

tactic: aesop
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
X Y : C
α : F ⟶ G
inst✝ : ∀ (X : C), IsIso (α.app X)
⊢ ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ ((fun X => asIso (α.app X)) Y).hom = ((fun X => asIso (α.app X)) X).hom ≫ G.map f
state_after: no goals
Theorem: Set.preimage_iInter₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [preimage_iInter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
s : (i : ι) → κ i → Set β
⊢ f ⁻¹' ⋂ i, ⋂ j, s i j = ⋂ i, ⋂ j, f ⁻¹' s i j
state_after: no goals
Theorem: ByteArray.ofFn_eq_ofFnAux
File: .lake/packages/batteries/Batteries/Data/ByteArray.lean

tactic: funext n f
state_before: ⊢ @ofFn = @ByteArray.ofFnAux
state_after: case h.h
n : Nat
f : Fin n → UInt8
⊢ ofFn f = ByteArray.ofFnAux f

tactic: ext
state_before: case h.h
n : Nat
f : Fin n → UInt8
⊢ ofFn f = ByteArray.ofFnAux f
state_after: case h.h.a
n : Nat
f : Fin n → UInt8
⊢ (ofFn f).data = (ByteArray.ofFnAux f).data

tactic: simp [ofFnAux, Array.ofFn, ofFnAux_data, mkEmpty]
state_before: case h.h.a
n : Nat
f : Fin n → UInt8
⊢ (ofFn f).data = (ByteArray.ofFnAux f).data
state_after: no goals

tactic: rw [ofFnAux.go, Array.ofFn.go]
state_before: n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
⊢ (ByteArray.ofFnAux.go f i acc).data = Array.ofFn.go f i acc.data
state_after: n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
⊢ (if h : i < n then ByteArray.ofFnAux.go f (i + 1) (acc.push (f ⟨i, h⟩)) else acc).data =
    if h : i < n then Array.ofFn.go f (i + 1) (acc.data.push (f ⟨i, h⟩)) else acc.data

tactic: split
state_before: n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
⊢ (if h : i < n then ByteArray.ofFnAux.go f (i + 1) (acc.push (f ⟨i, h⟩)) else acc).data =
    if h : i < n then Array.ofFn.go f (i + 1) (acc.data.push (f ⟨i, h⟩)) else acc.data
state_after: case isTrue
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : i < n
⊢ (ByteArray.ofFnAux.go f (i + 1) (acc.push (f ⟨i, h✝⟩))).data = Array.ofFn.go f (i + 1) (acc.data.push (f ⟨i, h✝⟩))

case isFalse
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : ¬i < n
⊢ acc.data = acc.data

tactic: rw [ofFnAux_data f (i+1), push_data]
state_before: case isTrue
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : i < n
⊢ (ByteArray.ofFnAux.go f (i + 1) (acc.push (f ⟨i, h✝⟩))).data = Array.ofFn.go f (i + 1) (acc.data.push (f ⟨i, h✝⟩))

case isFalse
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : ¬i < n
⊢ acc.data = acc.data
state_after: case isFalse
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : ¬i < n
⊢ acc.data = acc.data

tactic: rfl
state_before: case isFalse
n : Nat
f : Fin n → UInt8
i : Nat
acc : ByteArray
h✝ : ¬i < n
⊢ acc.data = acc.data
state_after: no goals
Theorem: PosNum.cmp_eq
File: Mathlib/Data/Num/Lemmas.lean

tactic: have := cmp_to_nat m n
state_before: α : Type u_1
m n : PosNum
⊢ m.cmp n = Ordering.eq ↔ m = n
state_after: α : Type u_1
m n : PosNum
this : Ordering.casesOn (m.cmp n) (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ m.cmp n = Ordering.eq ↔ m = n

tactic: revert this
state_before: α : Type u_1
m n : PosNum
this : Ordering.casesOn (m.cmp n) (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ m.cmp n = Ordering.eq ↔ m = n
state_after: α : Type u_1
m n : PosNum
⊢ Ordering.casesOn (m.cmp n) (↑m < ↑n) (m = n) (↑n < ↑m) → (m.cmp n = Ordering.eq ↔ m = n)

tactic: cases cmp m n <;> intro this <;> simp at this ⊢ <;> try { exact this } <;>
simp [show m ≠ n from fun e => by rw [e] at this;exact lt_irrefl _ this]
state_before: α : Type u_1
m n : PosNum
⊢ Ordering.casesOn (m.cmp n) (↑m < ↑n) (m = n) (↑n < ↑m) → (m.cmp n = Ordering.eq ↔ m = n)
state_after: no goals

tactic: exact this
state_before: case eq
α : Type u_1
m n : PosNum
this : m = n
⊢ m = n
state_after: no goals

tactic: rw [e] at this
state_before: α : Type u_1
m n : PosNum
this : ↑n < ↑m
e : m = n
⊢ False
state_after: α : Type u_1
m n : PosNum
this : ↑n < ↑n
e : m = n
⊢ False

tactic: exact lt_irrefl _ this
state_before: α : Type u_1
m n : PosNum
this : ↑n < ↑n
e : m = n
⊢ False
state_after: no goals
Theorem: WeierstrassCurve.Affine.equation_iff_variableChange
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [equation_iff', ← neg_eq_zero, equation_zero, variableChange_a₆, inv_one, Units.val_one]
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x y : R
⊢ W.Equation x y ↔ (variableChange W { u := 1, r := x, s := 0, t := y }).toAffine.Equation 0 0
state_after: R : Type u
inst✝ : CommRing R
W : Affine R
x y : R
⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) = 0 ↔
    1 ^ 6 *
        (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +
                { u := 1, r := x, s := 0, t := y }.r ^ 3 -
              { u := 1, r := x, s := 0, t := y }.t * W.a₃ -
            { u := 1, r := x, s := 0, t := y }.t ^ 2 -
          { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁) =
      0

tactic: congr! 1
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
x y : R
⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) = 0 ↔
    1 ^ 6 *
        (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +
                { u := 1, r := x, s := 0, t := y }.r ^ 3 -
              { u := 1, r := x, s := 0, t := y }.t * W.a₃ -
            { u := 1, r := x, s := 0, t := y }.t ^ 2 -
          { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁) =
      0
state_after: case a.h.e'_2
R : Type u
inst✝ : CommRing R
W : Affine R
x y : R
⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) =
    1 ^ 6 *
      (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +
              { u := 1, r := x, s := 0, t := y }.r ^ 3 -
            { u := 1, r := x, s := 0, t := y }.t * W.a₃ -
          { u := 1, r := x, s := 0, t := y }.t ^ 2 -
        { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁)

tactic: ring1
state_before: case a.h.e'_2
R : Type u
inst✝ : CommRing R
W : Affine R
x y : R
⊢ -(y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆)) =
    1 ^ 6 *
      (W.a₆ + { u := 1, r := x, s := 0, t := y }.r * W.a₄ + { u := 1, r := x, s := 0, t := y }.r ^ 2 * W.a₂ +
              { u := 1, r := x, s := 0, t := y }.r ^ 3 -
            { u := 1, r := x, s := 0, t := y }.t * W.a₃ -
          { u := 1, r := x, s := 0, t := y }.t ^ 2 -
        { u := 1, r := x, s := 0, t := y }.r * { u := 1, r := x, s := 0, t := y }.t * W.a₁)
state_after: no goals
Theorem: MeasureTheory.withDensity_apply'
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: apply le_antisymm ?_ (withDensity_apply_le f s)
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
⊢ (μ.withDensity f) s = ∫⁻ (a : α) in s, f a ∂μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
⊢ (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ

tactic: let t := toMeasurable μ s
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
⊢ (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ
state_after: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
t : Set α := toMeasurable μ s
⊢ (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ

tactic: calc
μ.withDensity f s ≤ μ.withDensity f t := measure_mono (subset_toMeasurable μ s)
_ = ∫⁻ a in t, f a ∂μ := withDensity_apply f (measurableSet_toMeasurable μ s)
_ = ∫⁻ a in s, f a ∂μ := by congr 1; exact restrict_toMeasurable_of_sFinite s
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
t : Set α := toMeasurable μ s
⊢ (μ.withDensity f) s ≤ ∫⁻ (a : α) in s, f a ∂μ
state_after: no goals

tactic: congr 1
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
t : Set α := toMeasurable μ s
⊢ ∫⁻ (a : α) in t, f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ
state_after: case e_μ
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
t : Set α := toMeasurable μ s
⊢ μ.restrict t = μ.restrict s

tactic: exact restrict_toMeasurable_of_sFinite s
state_before: case e_μ
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
inst✝ : SFinite μ
f : α → ℝ≥0∞
s : Set α
t : Set α := toMeasurable μ s
⊢ μ.restrict t = μ.restrict s
state_after: no goals
Theorem: DirichletCharacter.changeLevel_self_toUnitHom
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

tactic: rw [changeLevel_self]
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
⊢ toUnitHom ((changeLevel ⋯) χ) = toUnitHom χ
state_after: no goals
Theorem: MvPolynomial.coeff_single_X_pow
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: simp only [coeff_X_pow, single_eq_single_iff]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s✝ : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
s s' : σ
n n' : ℕ
⊢ coeff (Finsupp.single s' n') (X s ^ n) = if s = s' ∧ n = n' ∨ n = 0 ∧ n' = 0 then 1 else 0
state_after: no goals
Theorem: Monoid.exponent_pi
File: Mathlib/GroupTheory/Exponent.lean

tactic: refine dvd_antisymm ?_ ?_
state_before: G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
⊢ exponent ((i : ι) → M i) = univ.lcm fun x => exponent (M x)
state_after: case refine_1
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
⊢ exponent ((i : ι) → M i) ∣ univ.lcm fun x => exponent (M x)

case refine_2
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
⊢ (univ.lcm fun x => exponent (M x)) ∣ exponent ((i : ι) → M i)

tactic: refine exponent_dvd_of_forall_pow_eq_one fun m ↦ ?_
state_before: case refine_1
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
⊢ exponent ((i : ι) → M i) ∣ univ.lcm fun x => exponent (M x)
state_after: case refine_1
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
⊢ (m ^ univ.lcm fun x => exponent (M x)) = 1

tactic: ext i
state_before: case refine_1
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
⊢ (m ^ univ.lcm fun x => exponent (M x)) = 1
state_after: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ (m ^ univ.lcm fun x => exponent (M x)) i = 1 i

tactic: rw [Pi.pow_apply, Pi.one_apply, ← orderOf_dvd_iff_pow_eq_one]
state_before: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ (m ^ univ.lcm fun x => exponent (M x)) i = 1 i
state_after: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ orderOf (m i) ∣ univ.lcm fun x => exponent (M x)

tactic: apply dvd_trans (Monoid.order_dvd_exponent (m i))
state_before: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ orderOf (m i) ∣ univ.lcm fun x => exponent (M x)
state_after: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ exponent (M i) ∣ univ.lcm fun x => exponent (M x)

tactic: exact Finset.dvd_lcm (mem_univ i)
state_before: case refine_1.h
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
m : (i : ι) → M i
i : ι
⊢ exponent (M i) ∣ univ.lcm fun x => exponent (M x)
state_after: no goals

tactic: apply Finset.lcm_dvd fun i _ ↦ ?_
state_before: case refine_2
G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
⊢ (univ.lcm fun x => exponent (M x)) ∣ exponent ((i : ι) → M i)
state_after: G : Type u
ι : Type u_1
inst✝¹ : Fintype ι
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
i : ι
x✝ : i ∈ univ
⊢ exponent (M i) ∣ exponent ((i : ι) → M i)
Theorem: Metric.hausdorffDist_self_zero
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [hausdorffDist]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ hausdorffDist s s = 0
state_after: no goals
Theorem: antivaryOn_iff_smul_rearrangement
File: Mathlib/Algebra/Order/Monovary.lean

tactic: rw [monovaryOn_iff_smul_rearrangement]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
f : ι → α
g : ι → β
s : Set ι
a a₁ a₂ : α
b b₁ b₂ : β
⊢ MonovaryOn f (⇑OrderDual.toDual ∘ g) s ↔
    ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → f i • g i + f j • g j ≤ f i • g j + f j • g i
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
f : ι → α
g : ι → β
s : Set ι
a a₁ a₂ : α
b b₁ b₂ : β
⊢ (∀ ⦃i : ι⦄,
      i ∈ s →
        ∀ ⦃j : ι⦄,
          j ∈ s →
            f i • (⇑OrderDual.toDual ∘ g) j + f j • (⇑OrderDual.toDual ∘ g) i ≤
              f i • (⇑OrderDual.toDual ∘ g) i + f j • (⇑OrderDual.toDual ∘ g) j) ↔
    ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → f i • g i + f j • g j ≤ f i • g j + f j • g i

tactic: rfl
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : LinearOrderedAddCommGroup β
inst✝¹ : Module α β
inst✝ : OrderedSMul α β
f : ι → α
g : ι → β
s : Set ι
a a₁ a₂ : α
b b₁ b₂ : β
⊢ (∀ ⦃i : ι⦄,
      i ∈ s →
        ∀ ⦃j : ι⦄,
          j ∈ s →
            f i • (⇑OrderDual.toDual ∘ g) j + f j • (⇑OrderDual.toDual ∘ g) i ≤
              f i • (⇑OrderDual.toDual ∘ g) i + f j • (⇑OrderDual.toDual ∘ g) j) ↔
    ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → f i • g i + f j • g j ≤ f i • g j + f j • g i
state_after: no goals