ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: neg_one_pow_eq_pow_mod_two
File: Mathlib/Algebra/Ring/Commute.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Ring R
a b : R
n✝ n : ℕ
⊢ (-1) ^ n = (-1) ^ (n % 2)
state_after: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Ring R
a b : R
n✝ n : ℕ
⊢ (-1) ^ (n % 2) * ((-1) ^ 2) ^ (n / 2) = (-1) ^ ((n % 2 + 2 * (n / 2)) % 2)
tactic: rw [← Nat.mod_add_div n 2, pow_add, pow_mul]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Ring R
a b : R
n✝ n : ℕ
⊢ (-1) ^ (n % 2) * ((-1) ^ 2) ^ (n / 2) = (-1) ^ ((n % 2 + 2 * (n / 2)) % 2)
state_after: no goals
tactic: simp [sq]
Theorem: IsCyclotomicExtension.subsingleton_iff
File: Mathlib/NumberTheory/Cyclotomic/Basic.lean

Proof steps:
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : Subsingleton B
⊢ IsCyclotomicExtension S A B ↔ S = ∅ ∨ S = {1}
state_after: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : Subsingleton B
this : Subsingleton (Subalgebra A B)
⊢ IsCyclotomicExtension S A B ↔ S = ∅ ∨ S = {1}
tactic: have : Subsingleton (Subalgebra A B) := inferInstance
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : Subsingleton B
this : Subsingleton (Subalgebra A B)
⊢ IsCyclotomicExtension S A B ↔ S = ∅ ∨ S = {1}
state_after: case mp
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : Subsingleton B
this : Subsingleton (Subalgebra A B)
⊢ IsCyclotomicExtension S A B → S = ∅ ∨ S = {1}

case mpr
n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra A B
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : Subsingleton B
this : Subsingleton (Subalgebra A B)
⊢ S = ∅ ∨ S = {1} → IsCyclotomicExtension S A B
tactic: constructor
Theorem: eq_sub_of_add_eq'
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a b c d : G
h : c * a = b
⊢ a = b / c
state_after: no goals
tactic: simp [h.symm]
Theorem: CochainComplex.HomComplex.Cocycle.shift_coe
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ : Cocycle K L n
a : ℤ
⊢ δ n (n + 1) ((↑γ).shift a) = 0
state_after: no goals
tactic: simp
Theorem: Real.sum_sqrt_mul_sqrt_le
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: α : Type u_1
inst✝ : TopologicalSpace α
f✝ : α → ℝ
s✝ : Set α
x : α
ι : Type u_2
f g : ι → ℝ
s : Finset ι
hf : ∀ (i : ι), 0 ≤ f i
hg : ∀ (i : ι), 0 ≤ g i
⊢ ∑ i ∈ s, √(f i) * √(g i) ≤ √(∑ i ∈ s, f i) * √(∑ i ∈ s, g i)
state_after: no goals
tactic: simpa [*] using sum_mul_le_sqrt_mul_sqrt _ (fun x ↦ √(f x)) (fun x ↦ √(g x))
Theorem: CategoryTheory.Bicategory.associator_naturality_right
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

Proof steps:
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f : a ⟶ b
g : b ⟶ c
h h' : c ⟶ d
η : h ⟶ h'
⊢ (f ≫ g) ◁ η ≫ (α_ f g h').hom = (α_ f g h).hom ≫ f ◁ g ◁ η
state_after: no goals
tactic: simp
Theorem: Matrix.range_diagonal
File: Mathlib/LinearAlgebra/Matrix/Diagonal.lean

Proof steps:
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ LinearMap.range (toLin' (diagonal w)) = ⨆ i ∈ {i | w i ≠ 0}, LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ LinearMap.range (toLin' (diagonal w)) = ⨆ i, ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: dsimp only [mem_setOf_eq]
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ LinearMap.range (toLin' (diagonal w)) = ⨆ i, ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ ⨆ i, Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i)) =
    ⨆ i, ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: rw [← Submodule.map_top, ← iSup_range_stdBasis, Submodule.map_iSup]
state_before: m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ ⨆ i, Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i)) =
    ⨆ i, ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: case e_s
m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ (fun i => Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i))) = fun i =>
    ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: congr
state_before: case e_s
m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
⊢ (fun i => Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i))) = fun i =>
    ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: case e_s.h
m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
i : m
⊢ Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i)) =
    ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
tactic: funext i
state_before: case e_s.h
m : Type u_1
n : Type u_2
inst✝³ : Fintype m
inst✝² : Fintype n
K : Type u
inst✝¹ : Semifield K
inst✝ : DecidableEq m
w : m → K
i : m
⊢ Submodule.map (toLin' (diagonal w)) (LinearMap.range (LinearMap.stdBasis K (fun a => K) i)) =
    ⨆ (_ : w i ≠ 0), LinearMap.range (LinearMap.stdBasis K (fun x => K) i)
state_after: no goals
tactic: rw [← LinearMap.range_comp, diagonal_comp_stdBasis, ← range_smul']
Theorem: Polynomial.Monic.degree_mul
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hq : q.Monic
this : DecidableEq R := Classical.decEq R
hp : p = 0
⊢ (p * q).degree = p.degree + q.degree
state_after: no goals
tactic: simp [hp]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
hq : q.Monic
this : DecidableEq R := Classical.decEq R
hp : ¬p = 0
⊢ p.leadingCoeff * q.leadingCoeff ≠ 0
state_after: no goals
tactic: rwa [hq.leadingCoeff, mul_one, Ne, leadingCoeff_eq_zero]
Theorem: map_extChartAt_nhdsWithin_eq_image'
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
inst✝¹ : ChartedSpace H M
inst✝ : ChartedSpace H' M'
x y : M
hy : y ∈ (extChartAt I x).source
⊢ y ∈ (chartAt H x).source
state_after: no goals
tactic: rwa [← extChartAt_source I]
Theorem: MeasureTheory.UnifTight.sub
File: Mathlib/MeasureTheory/Function/UnifTight.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
f g : ι → α → β
p : ℝ≥0∞
hf : UnifTight f p μ
hg : UnifTight g p μ
hf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ
hg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ
⊢ UnifTight (f - g) p μ
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
f g : ι → α → β
p : ℝ≥0∞
hf : UnifTight f p μ
hg : UnifTight g p μ
hf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ
hg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ
⊢ UnifTight (f + -g) p μ
tactic: rw [sub_eq_add_neg]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
f g : ι → α → β
p : ℝ≥0∞
hf : UnifTight f p μ
hg : UnifTight g p μ
hf_meas : ∀ (i : ι), AEStronglyMeasurable (f i) μ
hg_meas : ∀ (i : ι), AEStronglyMeasurable (g i) μ
⊢ UnifTight (f + -g) p μ
state_after: no goals
tactic: exact hf.add hg.neg hf_meas fun i => (hg_meas i).neg
Theorem: AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal.prime
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
q : ↑↑(Spec A⁰_ f).toPresheafedSpace
x y : A
x✝¹ : Homogeneous 𝒜 x
x✝ : Homogeneous 𝒜 y
hxy : x * y ∈ asIdeal f_deg hm q
nx : ℕ
hnx : x ∈ 𝒜 nx
ny : ℕ
hny : y ∈ 𝒜 ny
⊢ (∀ (i : ℕ),
      HomogeneousLocalization.mk { deg := m * i, num := ⟨(proj 𝒜 i) x ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ } ∈
        q.asIdeal) ∨
    ∀ (i : ℕ),
      HomogeneousLocalization.mk { deg := m * i, num := ⟨(proj 𝒜 i) y ^ m, ⋯⟩, den := ⟨f ^ i, ⋯⟩, den_mem := ⋯ } ∈
        q.asIdeal
state_after: R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
q : ↑↑(Spec A⁰_ f).toPresheafedSpace
x y : A
x✝¹ : Homogeneous 𝒜 x
x✝ : Homogeneous 𝒜 y
hxy : x * y ∈ asIdeal f_deg hm q
nx : ℕ
hnx : x ∈ 𝒜 nx
ny : ℕ
hny : y ∈ 𝒜 ny
⊢ HomogeneousLocalization.mk { deg := m * nx, num := ⟨(proj 𝒜 nx) x ^ m, ⋯⟩, den := ⟨f ^ nx, ⋯⟩, den_mem := ⋯ } ∈
      q.asIdeal ∨
    HomogeneousLocalization.mk { deg := m * ny, num := ⟨(proj 𝒜 ny) y ^ m, ⋯⟩, den := ⟨f ^ ny, ⋯⟩, den_mem := ⋯ } ∈
      q.asIdeal

R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
q : ↑↑(Spec A⁰_ f).toPresheafedSpace
x y : A
x✝¹ : Homogeneous 𝒜 x
x✝ : Homogeneous 𝒜 y
hxy : x * y ∈ asIdeal f_deg hm q
nx : ℕ
hnx : x ∈ 𝒜 nx
ny : ℕ
hny : y ∈ 𝒜 ny
⊢ ∀ (b : ℕ),
    b ≠ ny →
      HomogeneousLocalization.mk { deg := m * b, num := ⟨(proj 𝒜 b) y ^ m, ⋯⟩, den := ⟨f ^ b, ⋯⟩, den_mem := ⋯ } ∈
        q.asIdeal

R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
hm : 0 < m
q : ↑↑(Spec A⁰_ f).toPresheafedSpace
x y : A
x✝¹ : Homogeneous 𝒜 x
x✝ : Homogeneous 𝒜 y
hxy : x * y ∈ asIdeal f_deg hm q
nx : ℕ
hnx : x ∈ 𝒜 nx
ny : ℕ
hny : y ∈ 𝒜 ny
⊢ ∀ (b : ℕ),
    b ≠ nx →
      HomogeneousLocalization.mk { deg := m * b, num := ⟨(proj 𝒜 b) x ^ m, ⋯⟩, den := ⟨f ^ b, ⋯⟩, den_mem := ⋯ } ∈
        q.asIdeal
tactic: rw [← and_forall_ne nx, and_iff_left, ← and_forall_ne ny, and_iff_left]
Theorem: strictMono_restrict
File: Mathlib/Data/Set/Function.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
s : Set α
⊢ StrictMono (s.restrict f) ↔ StrictMonoOn f s
state_after: no goals
tactic: simp [Set.restrict, StrictMono, StrictMonoOn]
Theorem: RingTheory.Sequence.IsRegular.nil
File: Mathlib/RingTheory/Regular/RegularSequence.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
M : Type u_3
M₂ : Type u_4
M₃ : Type u_5
M₄ : Type u_6
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Nontrivial M
h : ⊤ = Ideal.ofList [] • ⊤
⊢ False
state_after: R : Type u_1
S : Type u_2
M : Type u_3
M₂ : Type u_4
M₃ : Type u_5
M₄ : Type u_6
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Nontrivial M
h : Subsingleton (Submodule R M)
⊢ False
tactic: rw [Ideal.ofList_nil, bot_smul, eq_comm, subsingleton_iff_bot_eq_top] at h
state_before: R : Type u_1
S : Type u_2
M : Type u_3
M₂ : Type u_4
M₃ : Type u_5
M₄ : Type u_6
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : AddCommGroup M₃
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M₄
inst✝ : Nontrivial M
h : Subsingleton (Submodule R M)
⊢ False
state_after: no goals
tactic: exact not_subsingleton M ((Submodule.subsingleton_iff _).mp h)
Theorem: Polynomial.degree_le_mul_left
File: Mathlib/Algebra/Polynomial/RingDivision.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q p : R[X]
hq : q ≠ 0
⊢ p.degree ≤ (p * q).degree
state_after: no goals
tactic: classical
  exact if hp : p = 0 then by simp only [hp, zero_mul, le_refl]
  else by
    rw [degree_mul, degree_eq_natDegree hp, degree_eq_natDegree hq]
    exact WithBot.coe_le_coe.2 (Nat.le_add_right _ _)
Theorem: SimpleGraph.ConnectedComponent.iso_inv_image_comp_eq_iff_eq_map
File: Mathlib/Combinatorics/SimpleGraph/Path.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
φ : G ≃g G'
v : V
v' : V'
C : G.ConnectedComponent
⊢ G.connectedComponentMk (φ.symm v') = C ↔ G'.connectedComponentMk v' = map (RelIso.toRelEmbedding φ).toRelHom C
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
φ : G ≃g G'
v : V
v' : V'
C : G.ConnectedComponent
u : V
⊢ G.connectedComponentMk (φ.symm v') = G.connectedComponentMk u ↔
    G'.connectedComponentMk v' = map (RelIso.toRelEmbedding φ).toRelHom (G.connectedComponentMk u)
tactic: refine C.ind fun u => ?_
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
φ : G ≃g G'
v : V
v' : V'
C : G.ConnectedComponent
u : V
⊢ G.connectedComponentMk (φ.symm v') = G.connectedComponentMk u ↔
    G'.connectedComponentMk v' = map (RelIso.toRelEmbedding φ).toRelHom (G.connectedComponentMk u)
state_after: no goals
tactic: simp only [Iso.symm_apply_reachable, ConnectedComponent.eq, ConnectedComponent.map_mk,
    RelEmbedding.coe_toRelHom, RelIso.coe_toRelEmbedding]
Theorem: Rel.inter_dom_subset_preimage_image
File: Mathlib/Data/Rel.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
⊢ s ∩ r.dom ⊆ r.preimage (r.image s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∩ r.dom
⊢ x ∈ r.preimage (r.image s)
tactic: intro x hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∩ r.dom
⊢ x ∈ r.preimage (r.image s)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∧ x ∈ {x | ∃ y, r x y}
⊢ x ∈ r.preimage (r.image s)
tactic: simp only [Set.mem_inter_iff, dom] at hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s ∧ x ∈ {x | ∃ y, r x y}
⊢ x ∈ r.preimage (r.image s)
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ x ∈ r.preimage (r.image s)
tactic: rcases hx with ⟨hx, ⟨y, rxy⟩⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ x ∈ r.preimage (r.image s)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ y ∈ r.image s ∧ r.inv y x
tactic: use y
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ y ∈ r.image s ∧ r.inv y x
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ (∃ x ∈ s, r x y) ∧ r.inv y x
tactic: simp only [image, Set.mem_setOf_eq]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
x : α
hx : x ∈ s
y : β
rxy : r x y
⊢ (∃ x ∈ s, r x y) ∧ r.inv y x
state_after: no goals
tactic: exact ⟨⟨x, hx, rxy⟩, rxy⟩
Theorem: Polynomial.Monic.mul_natDegree_lt_iff
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : p.Monic
q : R[X]
⊢ (p * q).natDegree < p.natDegree ↔ p ≠ 1 ∧ q = 0
state_after: case pos
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : p.Monic
q : R[X]
hq : q = 0
⊢ (p * q).natDegree < p.natDegree ↔ p ≠ 1 ∧ q = 0

case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : p.Monic
q : R[X]
hq : ¬q = 0
⊢ (p * q).natDegree < p.natDegree ↔ p ≠ 1 ∧ q = 0
tactic: by_cases hq : q = 0
Theorem: Nat.odd_add'
File: Mathlib/Algebra/Ring/Parity.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m n : ℕ
⊢ Odd (m + n) ↔ (Odd n ↔ Even m)
state_after: no goals
tactic: rw [add_comm, odd_add]
Theorem: finsum_mem_add_distrib'
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
hf : (s ∩ mulSupport f).Finite
hg : (s ∩ mulSupport g).Finite
⊢ ∏ᶠ (i : α) (_ : i ∈ s), f i * g i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ s), g i
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
hf : (mulSupport (s.mulIndicator f)).Finite
hg : (mulSupport (s.mulIndicator g)).Finite
⊢ ∏ᶠ (i : α) (_ : i ∈ s), f i * g i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ s), g i
tactic: rw [← mulSupport_mulIndicator] at hf hg
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
hf : (mulSupport (s.mulIndicator f)).Finite
hg : (mulSupport (s.mulIndicator g)).Finite
⊢ ∏ᶠ (i : α) (_ : i ∈ s), f i * g i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ s), g i
state_after: no goals
tactic: simp only [finprod_mem_def, mulIndicator_mul, finprod_mul_distrib hf hg]
Theorem: List.unzip_zip_right
File: Mathlib/Data/List/Zip.lean

Proof steps:
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l₁ : List α
l₂ : List β
h : l₂.length ≤ l₁.length
⊢ (l₁.zip l₂).unzip.2 = l₂
state_after: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l₁ : List α
l₂ : List β
h : l₂.length ≤ l₁.length
⊢ (l₂.zip l₁).unzip.swap.2 = l₂
tactic: rw [← zip_swap, unzip_swap]
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type u_3
ε : Type u_4
l₁ : List α
l₂ : List β
h : l₂.length ≤ l₁.length
⊢ (l₂.zip l₁).unzip.swap.2 = l₂
state_after: no goals
tactic: exact unzip_zip_left h
Theorem: Mathlib.Meta.NormNum.jacobiSymNat.double_even
File: Mathlib/Tactic/NormNum/LegendreSymbol.lean

Proof steps:
state_before: a b c : ℕ
r : ℤ
ha : a % 4 = 0
hb : b % 2 = 1
hc : a / 4 = c
hr : jacobiSymNat c b = r
⊢ jacobiSymNat a b = r
state_after: a b c : ℕ
r : ℤ
ha : a % 4 = 0
hb : b % 2 = 1
hc : a / 4 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = jacobiSym (↑a / 4) b
tactic: simp only [jacobiSymNat, ← hr, ← hc, Int.ofNat_ediv, Nat.cast_ofNat]
state_before: a b c : ℕ
r : ℤ
ha : a % 4 = 0
hb : b % 2 = 1
hc : a / 4 = c
hr : jacobiSymNat c b = r
⊢ jacobiSym (↑a) b = jacobiSym (↑a / 4) b
state_after: no goals
tactic: exact (jacobiSym.div_four_left (mod_cast ha) hb).symm
Theorem: List.forall₂_nil_right_iff
File: Mathlib/Data/List/Forall2.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
H : Forall₂ R l []
⊢ l = []
state_after: case nil
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
⊢ [] = []
tactic: cases H
state_before: case nil
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
⊢ [] = []
state_after: no goals
tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
⊢ l = [] → Forall₂ R l []
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
⊢ Forall₂ R [] []
tactic: rintro rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
⊢ Forall₂ R [] []
state_after: no goals
tactic: exact Forall₂.nil