1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Primrec.nat_omega_rec
File: Mathlib/Computability/Primrec.lean

tactic: simpa using Ord
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β → σ
m : α → β → ℕ
l : α → β → List β
g : α → β × List σ → Option σ
hm : Primrec₂ m
hl : Primrec₂ l
hg : Primrec₂ g
Ord : ∀ (a : α) (b b' : β), b' ∈ l a b → m a b' < m a b
H : ∀ (a : α) (b : β), g a (b, List.map (f a) (l a b)) = some (f a b)
⊢ ∀ (b b' : α × β), b' ∈ List.map (fun b_1 => (b.1, b_1)) (l b.1 b.2) → uncurry m b' < uncurry m b
state_after: no goals

tactic: simpa [Function.comp] using H
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β → σ
m : α → β → ℕ
l : α → β → List β
g : α → β × List σ → Option σ
hm : Primrec₂ m
hl : Primrec₂ l
hg : Primrec₂ g
Ord : ∀ (a : α) (b b' : β), b' ∈ l a b → m a b' < m a b
H : ∀ (a : α) (b : β), g a (b, List.map (f a) (l a b)) = some (f a b)
⊢ ∀ (b : α × β), g b.1 (b.2, List.map (uncurry f) (List.map (fun b_1 => (b.1, b_1)) (l b.1 b.2))) = some (uncurry f b)
state_after: no goals
Theorem: MeasureTheory.IsSetAlgebra.generateSetAlgebra_subset
File: Mathlib/MeasureTheory/SetAlgebra.lean

tactic: intro s hs
state_before: α : Type u_1
𝒜 : Set (Set α)
s t : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
⊢ generateSetAlgebra 𝒜 ⊆ ℬ
state_after: α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s : Set α
hs : s ∈ generateSetAlgebra 𝒜
⊢ s ∈ ℬ

tactic: induction hs with
| base t t_mem => exact h t_mem
| empty => exact hℬ.empty_mem
| compl t _ t_mem => exact hℬ.compl_mem t_mem
| union t u _ _ t_mem u_mem => exact hℬ.union_mem t_mem u_mem
state_before: α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s : Set α
hs : s ∈ generateSetAlgebra 𝒜
⊢ s ∈ ℬ
state_after: no goals

tactic: exact h t_mem
state_before: case base
α : Type u_1
𝒜 : Set (Set α)
s✝ t✝ : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s t : Set α
t_mem : t ∈ 𝒜
⊢ t ∈ ℬ
state_after: no goals

tactic: exact hℬ.empty_mem
state_before: case empty
α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s : Set α
⊢ ∅ ∈ ℬ
state_after: no goals

tactic: exact hℬ.compl_mem t_mem
state_before: case compl
α : Type u_1
𝒜 : Set (Set α)
s✝ t✝ : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s t : Set α
hs✝ : generateSetAlgebra 𝒜 t
t_mem : t ∈ ℬ
⊢ tᶜ ∈ ℬ
state_after: no goals

tactic: exact hℬ.union_mem t_mem u_mem
state_before: case union
α : Type u_1
𝒜 : Set (Set α)
s✝ t✝ : Set α
ℬ : Set (Set α)
h : 𝒜 ⊆ ℬ
hℬ : IsSetAlgebra ℬ
s t u : Set α
hs✝ : generateSetAlgebra 𝒜 t
ht✝ : generateSetAlgebra 𝒜 u
t_mem : t ∈ ℬ
u_mem : u ∈ ℬ
⊢ t ∪ u ∈ ℬ
state_after: no goals
Theorem: Inducing.continuousAt_iff'
File: Mathlib/Topology/Maps.lean

tactic: simp_rw [ContinuousAt, Filter.Tendsto, ← hf.map_nhds_of_mem _ h, Filter.map_map, comp]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Inducing f
x : X
h : range f ∈ 𝓝 (f x)
⊢ ContinuousAt (g ∘ f) x ↔ ContinuousAt g (f x)
state_after: no goals
Theorem: Batteries.RBNode.Path.rootOrdered_iff
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: induction p with
  (simp [All_def] at hp; simp [*, and_assoc, and_left_comm, and_comm, or_imp, forall_and])
| left _ _ x _ ih => exact fun vx _ _ _ ha => vx.trans (hp.2.1 _ ha)
| right _ _ x _ ih => exact fun xv _ _ _ ha => (hp.2.1 _ ha).trans xv
state_before: α : Type u_1
cmp : α → α → Ordering
v : α
p : Path α
hp : Ordered cmp p
⊢ RootOrdered cmp p v ↔ (∀ (a : α), a ∈ p.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ p.listR → cmpLT cmp v a
state_after: no goals

tactic: simp [All_def] at hp
state_before: case root
α : Type u_1
cmp : α → α → Ordering
v : α
hp : Ordered cmp root
⊢ RootOrdered cmp root v ↔ (∀ (a : α), a ∈ root.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ root.listR → cmpLT cmp v a
state_after: case root
α : Type u_1
cmp : α → α → Ordering
v : α
hp : True
⊢ RootOrdered cmp root v ↔ (∀ (a : α), a ∈ root.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ root.listR → cmpLT cmp v a

tactic: simp [*, and_assoc, and_left_comm, and_comm, or_imp, forall_and]
state_before: case root
α : Type u_1
cmp : α → α → Ordering
v : α
hp : True
⊢ RootOrdered cmp root v ↔ (∀ (a : α), a ∈ root.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ root.listR → cmpLT cmp v a
state_after: no goals

tactic: exact fun vx _ _ _ ha => vx.trans (hp.2.1 _ ha)
state_before: case left
α : Type u_1
cmp : α → α → Ordering
v : α
c✝ : RBColor
parent✝ : Path α
x : α
r✝ : RBNode α
ih :
  Ordered cmp parent✝ →
    (RootOrdered cmp parent✝ v ↔
      (∀ (a : α), a ∈ parent✝.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ parent✝.listR → cmpLT cmp v a)
hp :
  Ordered cmp parent✝ ∧
    (∀ (x_1 : α), x_1 ∈ r✝ → cmpLT cmp x x_1) ∧
      RootOrdered cmp parent✝ x ∧ (∀ (x : α), x ∈ r✝ → RootOrdered cmp parent✝ x) ∧ RBNode.Ordered cmp r✝
⊢ cmpLT cmp v x →
    (∀ (a : α), a ∈ parent✝.listL → cmpLT cmp a v) →
      (∀ (a : α), a ∈ parent✝.listR → cmpLT cmp v a) → ∀ (x : α), x ∈ r✝ → cmpLT cmp v x
state_after: no goals

tactic: exact fun xv _ _ _ ha => (hp.2.1 _ ha).trans xv
state_before: case right
α : Type u_1
cmp : α → α → Ordering
v : α
c✝ : RBColor
l✝ : RBNode α
x : α
parent✝ : Path α
ih :
  Ordered cmp parent✝ →
    (RootOrdered cmp parent✝ v ↔
      (∀ (a : α), a ∈ parent✝.listL → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ parent✝.listR → cmpLT cmp v a)
hp :
  Ordered cmp parent✝ ∧
    (∀ (x_1 : α), x_1 ∈ l✝ → cmpLT cmp x_1 x) ∧
      RootOrdered cmp parent✝ x ∧ (∀ (x : α), x ∈ l✝ → RootOrdered cmp parent✝ x) ∧ RBNode.Ordered cmp l✝
⊢ cmpLT cmp x v →
    (∀ (a : α), a ∈ parent✝.listL → cmpLT cmp a v) →
      (∀ (a : α), a ∈ parent✝.listR → cmpLT cmp v a) → ∀ (x : α), x ∈ l✝ → cmpLT cmp x v
state_after: no goals
Theorem: KaehlerDifferential.polynomial_D_apply
File: Mathlib/RingTheory/Kaehler/Polynomial.lean

tactic: rw [← aeval_X_left_apply P, (D R R[X]).map_aeval, aeval_X_left_apply, aeval_X_left_apply]
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
⊢ (D R R[X]) P = derivative P • (D R R[X]) X
state_after: no goals
Theorem: Finset.truncatedInf_empty
File: Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : SemilatticeInf α
inst✝⁴ : BoundedOrder α
inst✝³ : DecidableRel fun x x_1 => x ≤ x_1
inst✝² : SemilatticeInf β
inst✝¹ : BoundedOrder β
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a✝ a : α
⊢ a ∉ upperClosure ↑∅
state_after: no goals
Theorem: WittVector.truncateFun_pow
File: Mathlib/RingTheory/WittVector/Truncated.lean

tactic: witt_truncateFun_tac
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
inst✝ : CommRing R
x : 𝕎 R
m : ℕ
⊢ truncateFun n (x ^ m) = truncateFun n x ^ m
state_after: no goals
Theorem: TendstoUniformlyOnFilter.congr
File: Mathlib/Topology/UniformSpace/UniformConvergence.lean

tactic: refine fun u hu => ((hf u hu).and hff').mono fun n h => ?_
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
F' : ι → α → β
hf : TendstoUniformlyOnFilter F f p p'
hff' : ∀ᶠ (n : ι × α) in p ×ˢ p', F n.1 n.2 = F' n.1 n.2
⊢ TendstoUniformlyOnFilter F' f p p'
state_after: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
F' : ι → α → β
hf : TendstoUniformlyOnFilter F f p p'
hff' : ∀ᶠ (n : ι × α) in p ×ˢ p', F n.1 n.2 = F' n.1 n.2
u : Set (β × β)
hu : u ∈ 𝓤 β
n : ι × α
h : (f n.2, F n.1 n.2) ∈ u ∧ F n.1 n.2 = F' n.1 n.2
⊢ (f n.2, F' n.1 n.2) ∈ u

tactic: rw [← h.right]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
F' : ι → α → β
hf : TendstoUniformlyOnFilter F f p p'
hff' : ∀ᶠ (n : ι × α) in p ×ˢ p', F n.1 n.2 = F' n.1 n.2
u : Set (β × β)
hu : u ∈ 𝓤 β
n : ι × α
h : (f n.2, F n.1 n.2) ∈ u ∧ F n.1 n.2 = F' n.1 n.2
⊢ (f n.2, F' n.1 n.2) ∈ u
state_after: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
F' : ι → α → β
hf : TendstoUniformlyOnFilter F f p p'
hff' : ∀ᶠ (n : ι × α) in p ×ˢ p', F n.1 n.2 = F' n.1 n.2
u : Set (β × β)
hu : u ∈ 𝓤 β
n : ι × α
h : (f n.2, F n.1 n.2) ∈ u ∧ F n.1 n.2 = F' n.1 n.2
⊢ (f n.2, F n.1 n.2) ∈ u

tactic: exact h.left
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝ : UniformSpace β
F : ι → α → β
f : α → β
s s' : Set α
x : α
p : Filter ι
p' : Filter α
g : ι → α
F' : ι → α → β
hf : TendstoUniformlyOnFilter F f p p'
hff' : ∀ᶠ (n : ι × α) in p ×ˢ p', F n.1 n.2 = F' n.1 n.2
u : Set (β × β)
hu : u ∈ 𝓤 β
n : ι × α
h : (f n.2, F n.1 n.2) ∈ u ∧ F n.1 n.2 = F' n.1 n.2
⊢ (f n.2, F n.1 n.2) ∈ u
state_after: no goals
Theorem: ENNReal.rpow_le_rpow_of_exponent_le
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: cases x
state_before: x : ℝ≥0∞
y z : ℝ
hx : 1 ≤ x
hyz : y ≤ z
⊢ x ^ y ≤ x ^ z
state_after: case top
y z : ℝ
hyz : y ≤ z
hx : 1 ≤ ⊤
⊢ ⊤ ^ y ≤ ⊤ ^ z

case coe
y z : ℝ
hyz : y ≤ z
x✝ : ℝ≥0
hx : 1 ≤ ↑x✝
⊢ ↑x✝ ^ y ≤ ↑x✝ ^ z

tactic: rcases lt_trichotomy y 0 with (Hy | Hy | Hy) <;>
rcases lt_trichotomy z 0 with (Hz | Hz | Hz) <;>
simp [Hy, Hz, top_rpow_of_neg, top_rpow_of_pos, le_refl] <;>
linarith
state_before: case top
y z : ℝ
hyz : y ≤ z
hx : 1 ≤ ⊤
⊢ ⊤ ^ y ≤ ⊤ ^ z
state_after: no goals

tactic: simp only [one_le_coe_iff, some_eq_coe] at hx
state_before: case coe
y z : ℝ
hyz : y ≤ z
x✝ : ℝ≥0
hx : 1 ≤ ↑x✝
⊢ ↑x✝ ^ y ≤ ↑x✝ ^ z
state_after: case coe
y z : ℝ
hyz : y ≤ z
x✝ : ℝ≥0
hx : 1 ≤ x✝
⊢ ↑x✝ ^ y ≤ ↑x✝ ^ z

tactic: simp [coe_rpow_of_ne_zero (ne_of_gt (lt_of_lt_of_le zero_lt_one hx)),
  NNReal.rpow_le_rpow_of_exponent_le hx hyz]
state_before: case coe
y z : ℝ
hyz : y ≤ z
x✝ : ℝ≥0
hx : 1 ≤ x✝
⊢ ↑x✝ ^ y ≤ ↑x✝ ^ z
state_after: no goals
Theorem: CategoryTheory.Bicategory.whisker_assoc_symm
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g g' : b ⟶ c
η : g ⟶ g'
h : c ⟶ d
⊢ f ◁ η ▷ h = (α_ f g h).inv ≫ (f ◁ η) ▷ h ≫ (α_ f g' h).hom
state_after: no goals
Theorem: Subgroup.mem_leftTransversals_iff_existsUnique_inv_mul_mem
File: Mathlib/GroupTheory/Complement.lean

tactic: rw [leftTransversals, Set.mem_setOf_eq, isComplement_iff_existsUnique]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
⊢ S ∈ leftTransversals T ↔ ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
⊢ (∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g) ↔ ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T

tactic: refine ⟨fun h g => ?_, fun h g => ?_⟩
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
⊢ (∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g) ↔ ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
state_after: case refine_1
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g
g : G
⊢ ∃! s, (↑s)⁻¹ * g ∈ T

case refine_2
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
⊢ ∃! x, ↑x.1 * ↑x.2 = g

tactic: obtain ⟨x, h1, h2⟩ := h g
state_before: case refine_1
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g
g : G
⊢ ∃! s, (↑s)⁻¹ * g ∈ T
state_after: case refine_1.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g
g : G
x : ↑S × ↑T
h1 : ↑x.1 * ↑x.2 = g
h2 : ∀ (y : ↑S × ↑T), (fun x => ↑x.1 * ↑x.2 = g) y → y = x
⊢ ∃! s, (↑s)⁻¹ * g ∈ T

tactic: obtain ⟨x, h1, h2⟩ := h g
state_before: case refine_2
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
⊢ ∃! x, ↑x.1 * ↑x.2 = g
state_after: case refine_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
x : ↑S
h1 : (↑x)⁻¹ * g ∈ T
h2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x
⊢ ∃! x, ↑x.1 * ↑x.2 = g

tactic: refine ⟨⟨x, (↑x)⁻¹ * g, h1⟩, mul_inv_cancel_left (↑x) g, fun y hy => ?_⟩
state_before: case refine_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
x : ↑S
h1 : (↑x)⁻¹ * g ∈ T
h2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x
⊢ ∃! x, ↑x.1 * ↑x.2 = g
state_after: case refine_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
x : ↑S
h1 : (↑x)⁻¹ * g ∈ T
h2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x
y : ↑S × ↑T
hy : (fun x => ↑x.1 * ↑x.2 = g) y
⊢ y = (x, ⟨(↑x)⁻¹ * g, h1⟩)

tactic: exact Prod.ext hf (Subtype.ext (eq_inv_mul_of_mul_eq (hf ▸ hy)))
state_before: case refine_2.intro.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
h : ∀ (g : G), ∃! s, (↑s)⁻¹ * g ∈ T
g : G
x : ↑S
h1 : (↑x)⁻¹ * g ∈ T
h2 : ∀ (y : ↑S), (fun s => (↑s)⁻¹ * g ∈ T) y → y = x
y : ↑S × ↑T
hy : (fun x => ↑x.1 * ↑x.2 = g) y
hf : y.1 = x
⊢ y = (x, ⟨(↑x)⁻¹ * g, h1⟩)
state_after: no goals
Theorem: Polynomial.map_dvd_map
File: Mathlib/Algebra/Polynomial/Div.lean

tactic: rw [← modByMonic_eq_zero_iff_dvd hx, ← modByMonic_eq_zero_iff_dvd (hx.map f), ←
  map_modByMonic f hx]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f x ∣ map f y ↔ x ∣ y
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f (y %ₘ x) = 0 ↔ y %ₘ x = 0

tactic: exact
  ⟨fun H => map_injective f hf <| by rw [H, Polynomial.map_zero], fun H => by
    rw [H, Polynomial.map_zero]⟩
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
⊢ map f (y %ₘ x) = 0 ↔ y %ₘ x = 0
state_after: no goals

tactic: rw [H, Polynomial.map_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
H : map f (y %ₘ x) = 0
⊢ map f (y %ₘ x) = map f 0
state_after: no goals

tactic: rw [H, Polynomial.map_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : Ring R
p q : R[X]
inst✝ : Ring S
f : R →+* S
hf : Function.Injective ⇑f
x y : R[X]
hx : x.Monic
H : y %ₘ x = 0
⊢ map f (y %ₘ x) = 0
state_after: no goals
Theorem: Complex.lim_im
File: Mathlib/Data/Complex/Abs.lean

tactic: rw [lim_eq_lim_im_add_lim_re]
state_before: f : CauSeq ℂ ⇑abs'
⊢ (cauSeqIm f).lim = f.lim.im
state_after: f : CauSeq ℂ ⇑abs'
⊢ (cauSeqIm f).lim = (↑(cauSeqRe f).lim + ↑(cauSeqIm f).lim * I).im

tactic: simp [ofReal']
state_before: f : CauSeq ℂ ⇑abs'
⊢ (cauSeqIm f).lim = (↑(cauSeqRe f).lim + ↑(cauSeqIm f).lim * I).im
state_after: no goals
Theorem: Submodule.torsion_int
File: Mathlib/Algebra/Module/Torsion.lean

tactic: ext x
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : NoZeroDivisors R
inst✝¹ : Nontrivial R
G : Type u_3
inst✝ : AddCommGroup G
⊢ (torsion ℤ G).toAddSubgroup = AddCommGroup.torsion G
state_after: case h
R : Type u_1
M : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : NoZeroDivisors R
inst✝¹ : Nontrivial R
G : Type u_3
inst✝ : AddCommGroup G
x : G
⊢ x ∈ (torsion ℤ G).toAddSubgroup ↔ x ∈ AddCommGroup.torsion G

tactic: refine ((isOfFinAddOrder_iff_zsmul_eq_zero (x := x)).trans ?_).symm
state_before: case h
R : Type u_1
M : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : NoZeroDivisors R
inst✝¹ : Nontrivial R
G : Type u_3
inst✝ : AddCommGroup G
x : G
⊢ x ∈ (torsion ℤ G).toAddSubgroup ↔ x ∈ AddCommGroup.torsion G
state_after: case h
R : Type u_1
M : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : NoZeroDivisors R
inst✝¹ : Nontrivial R
G : Type u_3
inst✝ : AddCommGroup G
x : G
⊢ (∃ n, n ≠ 0 ∧ n • x = 0) ↔ x ∈ (torsion ℤ G).toAddSubgroup

tactic: simp [mem_nonZeroDivisors_iff_ne_zero]
state_before: case h
R : Type u_1
M : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
inst✝² : NoZeroDivisors R
inst✝¹ : Nontrivial R
G : Type u_3
inst✝ : AddCommGroup G
x : G
⊢ (∃ n, n ≠ 0 ∧ n • x = 0) ↔ x ∈ (torsion ℤ G).toAddSubgroup
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.Point.toAffineLift_neg
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rcases P with @⟨⟨_⟩, hP⟩
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : W.Point
⊢ (-P).toAffineLift = -P.toAffineLift
state_after: case mk.mk
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
point✝ : PointClass F
a✝ : Fin 3 → F
hP : W.NonsingularLift (Quot.mk Setoid.r a✝)
⊢ (-mk hP).toAffineLift = -(mk hP).toAffineLift

tactic: exact toAffine_neg hP
state_before: case mk.mk
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
point✝ : PointClass F
a✝ : Fin 3 → F
hP : W.NonsingularLift (Quot.mk Setoid.r a✝)
⊢ (-mk hP).toAffineLift = -(mk hP).toAffineLift
state_after: no goals
Theorem: Encodable.mem_decode₂'
File: Mathlib/Logic/Encodable/Basic.lean

tactic: simpa [decode₂, bind_eq_some] using
  ⟨fun ⟨_, h₁, rfl, h₂⟩ => ⟨h₁, h₂⟩, fun ⟨h₁, h₂⟩ => ⟨_, h₁, rfl, h₂⟩⟩
state_before: α : Type u_1
β : Type u_2
inst✝ : Encodable α
n : ℕ
a : α
⊢ a ∈ decode₂ α n ↔ a ∈ decode n ∧ encode a = n
state_after: no goals
Theorem: sup_eq_mul_oneLePart_div
File: Mathlib/Algebra/Order/Group/PosPart.lean

tactic: simp [oneLePart, mul_sup]
state_before: α : Type u_1
β : Type u_2
inst✝³ inst✝² : Lattice α
inst✝¹ : CommGroup α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : α
⊢ a ⊔ b = b * (a / b)⁺ᵐ
state_after: no goals
Theorem: Irrational.inv
File: Mathlib/Data/Real/Irrational.lean

tactic: rwa [inv_inv]
state_before: q : ℚ
x y : ℝ
h : Irrational x
⊢ Irrational x⁻¹⁻¹
state_after: no goals
Theorem: Set.singleton_sigma_singleton
File: Mathlib/Data/Set/Sigma.lean

tactic: rw [sigma_singleton, image_singleton]
state_before: ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
β : ι → Type u_4
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a✝ : α i
a : (i : ι) → α i
⊢ ({i}.sigma fun i => {a i}) = {⟨i, a i⟩}
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.ofRestrict_appLE
File: Mathlib/AlgebraicGeometry/OpenImmersion.lean

tactic: exact Set.image_subset_iff.mpr e
state_before: C : Type u
inst✝ : Category.{v, u} C
U : TopCat
X : Scheme
f : U ⟶ TopCat.of ↑↑X.toPresheafedSpace
h : OpenEmbedding ⇑f
V : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(X.restrict h).toPresheafedSpace
e : W ≤ X.ofRestrict h ⁻¹ᵁ V
⊢ X.ofRestrict h ''ᵁ { unop := W }.unop ≤ V
state_after: no goals

tactic: dsimp [Hom.appLE]
state_before: C : Type u
inst✝ : Category.{v, u} C
U : TopCat
X : Scheme
f : U ⟶ TopCat.of ↑↑X.toPresheafedSpace
h : OpenEmbedding ⇑f
V : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(X.restrict h).toPresheafedSpace
e : W ≤ X.ofRestrict h ⁻¹ᵁ V
⊢ Hom.appLE (X.ofRestrict h) V W e = X.presheaf.map (homOfLE ⋯).op
state_after: C : Type u
inst✝ : Category.{v, u} C
U : TopCat
X : Scheme
f : U ⟶ TopCat.of ↑↑X.toPresheafedSpace
h : OpenEmbedding ⇑f
V : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(X.restrict h).toPresheafedSpace
e : W ≤ X.ofRestrict h ⁻¹ᵁ V
⊢ X.presheaf.map (⋯.adjunction.counit.app V).op ≫ (X.restrict h).presheaf.map (homOfLE e).op =
    X.presheaf.map (homOfLE ⋯).op

tactic: exact (X.presheaf.map_comp _ _).symm
state_before: C : Type u
inst✝ : Category.{v, u} C
U : TopCat
X : Scheme
f : U ⟶ TopCat.of ↑↑X.toPresheafedSpace
h : OpenEmbedding ⇑f
V : Opens ↑↑X.toPresheafedSpace
W : Opens ↑↑(X.restrict h).toPresheafedSpace
e : W ≤ X.ofRestrict h ⁻¹ᵁ V
⊢ X.presheaf.map (⋯.adjunction.counit.app V).op ≫ (X.restrict h).presheaf.map (homOfLE e).op =
    X.presheaf.map (homOfLE ⋯).op
state_after: no goals
Theorem: Set.exists_max_image
File: Mathlib/Data/Set/Finite.lean

tactic: simpa only [exists_prop, Finite.mem_toFinset] using
  h1.toFinset.exists_max_image f ⟨x, h1.mem_toFinset.2 hx⟩
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t : Set α
inst✝ : LinearOrder β
s : Set α
f : α → β
h1 : s.Finite
x : α
hx : x ∈ s
⊢ ∃ a ∈ s, ∀ b ∈ s, f b ≤ f a
state_after: no goals
Theorem: Finset.image_subset_iff_subset_preimage
File: Mathlib/Data/Finset/Preimage.lean

tactic: simp only [subset_iff, mem_preimage]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
inst✝ : DecidableEq β
f : α → β
s : Finset α
t : Finset β
hf : InjOn f (f ⁻¹' ↑t)
⊢ (∀ x ∈ s, f x ∈ t) ↔ s ⊆ t.preimage f hf
state_after: no goals
Theorem: Ordinal.blsub_congr
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: subst ho
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o₁ o₂ : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}
ho : o₁ = o₂
⊢ o₁.blsub f = o₂.blsub fun a h => f a ⋯
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o₁ : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}
⊢ o₁.blsub f = o₁.blsub fun a h => f a ⋯

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o₁ : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o₁ → Ordinal.{max u v}
⊢ o₁.blsub f = o₁.blsub fun a h => f a ⋯
state_after: no goals
Theorem: manyOneReducible_toNat
File: Mathlib/Computability/Reduce.lean

tactic: simp [toNat, setOf]
state_before: α : Type u
inst✝⁵ : Primcodable α
inst✝⁴ : Inhabited α
β : Type v
inst✝³ : Primcodable β
inst✝² : Inhabited β
γ : Type w
inst✝¹ : Primcodable γ
inst✝ : Inhabited γ
p : Set α
⊢ ∀ (a : α), p a ↔ toNat p (Encodable.encode a)
state_after: no goals
Theorem: Nat.append_lt
File: Mathlib/Data/Nat/Bitwise.lean

tactic: apply bitwise_lt
state_before: x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ y <<< n ||| x < 2 ^ (n + m)
state_after: case hx
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ y <<< n < 2 ^ (n + m)

case hy
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ x < 2 ^ (n + m)

tactic: rw [add_comm]
state_before: case hx
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ y <<< n < 2 ^ (n + m)
state_after: case hx
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ y <<< n < 2 ^ (m + n)

tactic: apply shiftLeft_lt hy
state_before: case hx
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ y <<< n < 2 ^ (m + n)
state_after: no goals

tactic: apply lt_of_lt_of_le hx <| Nat.pow_le_pow_right (le_succ _) (le_add_right _ _)
state_before: case hy
x y n m : ℕ
hx : x < 2 ^ n
hy : y < 2 ^ m
⊢ x < 2 ^ (n + m)
state_after: no goals
Theorem: Ideal.le_pow_of_le_ramificationIdx
File: Mathlib/NumberTheory/RamificationInertia.lean

tactic: contrapose! hn
state_before: R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
n : ℕ
hn : n ≤ ramificationIdx f p P
⊢ map f p ≤ P ^ n
state_after: R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
n : ℕ
hn : ¬map f p ≤ P ^ n
⊢ ramificationIdx f p P < n

tactic: exact ramificationIdx_lt hn
state_before: R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
n : ℕ
hn : ¬map f p ≤ P ^ n
⊢ ramificationIdx f p P < n
state_after: no goals