1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Set.SurjOn.perm_pow
File: Mathlib/GroupTheory/Perm/Basic.lean

tactic: simp_rw [Equiv.Perm.coe_pow]
state_before: α : Type u_1
f : Perm α
s : Set α
⊢ SurjOn (⇑f) s s → ∀ (n : ℕ), SurjOn (⇑(f ^ n)) s s
state_after: α : Type u_1
f : Perm α
s : Set α
⊢ SurjOn (⇑f) s s → ∀ (n : ℕ), SurjOn (⇑f)^[n] s s

tactic: exact SurjOn.iterate
state_before: α : Type u_1
f : Perm α
s : Set α
⊢ SurjOn (⇑f) s s → ∀ (n : ℕ), SurjOn (⇑f)^[n] s s
state_after: no goals
Theorem: YoungDiagram.exists_not_mem_row
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: obtain ⟨j, hj⟩ :=
  Infinite.exists_not_mem_finset
    (μ.cells.preimage (Prod.mk i) fun _ _ _ _ h => by
      cases h
      rfl)
state_before: μ : YoungDiagram
i : ℕ
⊢ ∃ j, (i, j) ∉ μ
state_after: case intro
μ : YoungDiagram
i j : ℕ
hj : j ∉ μ.cells.preimage (Prod.mk i) ⋯
⊢ ∃ j, (i, j) ∉ μ

tactic: rw [Finset.mem_preimage] at hj
state_before: case intro
μ : YoungDiagram
i j : ℕ
hj : j ∉ μ.cells.preimage (Prod.mk i) ⋯
⊢ ∃ j, (i, j) ∉ μ
state_after: case intro
μ : YoungDiagram
i j : ℕ
hj : (i, j) ∉ μ.cells
⊢ ∃ j, (i, j) ∉ μ

tactic: exact ⟨j, hj⟩
state_before: case intro
μ : YoungDiagram
i j : ℕ
hj : (i, j) ∉ μ.cells
⊢ ∃ j, (i, j) ∉ μ
state_after: no goals

tactic: cases h
state_before: μ : YoungDiagram
i x✝³ : ℕ
x✝² : x✝³ ∈ Prod.mk i ⁻¹' ↑μ.cells
x✝¹ : ℕ
x✝ : x✝¹ ∈ Prod.mk i ⁻¹' ↑μ.cells
h : (i, x✝³) = (i, x✝¹)
⊢ x✝³ = x✝¹
state_after: case refl
μ : YoungDiagram
i x✝² : ℕ
x✝¹ x✝ : x✝² ∈ Prod.mk i ⁻¹' ↑μ.cells
⊢ x✝² = x✝²

tactic: rfl
state_before: case refl
μ : YoungDiagram
i x✝² : ℕ
x✝¹ x✝ : x✝² ∈ Prod.mk i ⁻¹' ↑μ.cells
⊢ x✝² = x✝²
state_after: no goals
Theorem: FiniteDimensional.finrank_tensorProduct
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

tactic: simp [finrank]
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝¹⁹ : Ring R
inst✝¹⁸ : CommRing S
inst✝¹⁷ : AddCommGroup M
inst✝¹⁶ : AddCommGroup M'
inst✝¹⁵ : AddCommGroup M₁
inst✝¹⁴ : Module R M
inst✝¹³ : Module R M'
inst✝¹² : Module R M₁
inst✝¹¹ : StrongRankCondition R
inst✝¹⁰ : StrongRankCondition S
inst✝⁹ : Module S M
inst✝⁸ : Module.Free S M
inst✝⁷ : Module S M'
inst✝⁶ : Module.Free S M'
inst✝⁵ : Module S M₁
inst✝⁴ : Module.Free S M₁
inst✝³ : Algebra S R
inst✝² : Module R M
inst✝¹ : IsScalarTower S R M
inst✝ : Module.Free R M
⊢ finrank R (M ⊗[S] M') = finrank R M * finrank S M'
state_after: no goals
Theorem: LieModule.mem_weightSpaceOf
File: Mathlib/Algebra/Lie/Weights/Basic.lean

tactic: simp [weightSpaceOf]
state_before: K : Type u_1
R : Type u_2
L : Type u_3
M : Type u_4
inst✝⁷ : CommRing R
inst✝⁶ : LieRing L
inst✝⁵ : LieAlgebra R L
inst✝⁴ : LieAlgebra.IsNilpotent R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
χ : R
x : L
m : M
⊢ m ∈ weightSpaceOf M χ x ↔ ∃ k, (((toEnd R L M) x - χ • 1) ^ k) m = 0
state_after: no goals
Theorem: Equiv.Perm.support_prod_le
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: induction' l with hd tl hl
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
l : List (Perm α)
⊢ l.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support l)
state_after: case nil
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
⊢ [].prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support [])

case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ (hd :: tl).prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support (hd :: tl))

tactic: simp
state_before: case nil
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
⊢ [].prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support [])
state_after: no goals

tactic: rw [List.prod_cons, List.map_cons, List.foldr_cons]
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ (hd :: tl).prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support (hd :: tl))
state_after: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ (hd * tl.prod).support ≤ hd.support ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)

tactic: refine (support_mul_le hd tl.prod).trans ?_
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ (hd * tl.prod).support ≤ hd.support ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
state_after: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ hd.support ⊔ tl.prod.support ≤ hd.support ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)

tactic: exact sup_le_sup le_rfl hl
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : tl.prod.support ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ hd.support ⊔ tl.prod.support ≤ hd.support ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
state_after: no goals
Theorem: Real.tan_mul_cos
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [tan_eq_sin_div_cos, div_mul_cancel₀ _ hx]
state_before: x✝ y x : ℝ
hx : cos x ≠ 0
⊢ tan x * cos x = sin x
state_after: no goals
Theorem: Batteries.RBNode.balLeft_toList
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: unfold balLeft
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (l.balLeft v r).toList = l.toList ++ v :: r.toList
state_after: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (match l with
      | node red a x b => node red (node black a x b) v r
      | l =>
        match r with
        | node black a y b => l.balance2 v (node red a y b)
        | node red (node black a y b) z c => node red (node black l v a) y (b.balance2 z c.setRed)
        | r => node red l v r).toList =
    l.toList ++ v :: r.toList

tactic: split <;> (try simp)
state_before: α : Type u_1
l : RBNode α
v : α
r : RBNode α
⊢ (match l with
      | node red a x b => node red (node black a x b) v r
      | l =>
        match r with
        | node black a y b => l.balance2 v (node red a y b)
        | node red (node black a y b) z c => node red (node black l v a) y (b.balance2 z c.setRed)
        | r => node red l v r).toList =
    l.toList ++ v :: r.toList
state_after: case h_2
α : Type u_1
l : RBNode α
v : α
r l✝ : RBNode α
x✝ : ∀ (a : RBNode α) (x : α) (b : RBNode α), l = node red a x b → False
⊢ (match r with
      | node black a y b => l.balance2 v (node red a y b)
      | node red (node black a y b) z c => node red (node black l v a) y (b.balance2 z c.setRed)
      | r => node red l v r).toList =
    l.toList ++ v :: r.toList

tactic: split <;> simp
state_before: case h_2
α : Type u_1
l : RBNode α
v : α
r l✝ : RBNode α
x✝ : ∀ (a : RBNode α) (x : α) (b : RBNode α), l = node red a x b → False
⊢ (match r with
      | node black a y b => l.balance2 v (node red a y b)
      | node red (node black a y b) z c => node red (node black l v a) y (b.balance2 z c.setRed)
      | r => node red l v r).toList =
    l.toList ++ v :: r.toList
state_after: no goals

tactic: try simp
state_before: case h_1
α : Type u_1
v : α
r l✝ a✝ : RBNode α
x✝ : α
b✝ : RBNode α
⊢ (node red (node black a✝ x✝ b✝) v r).toList = (node red a✝ x✝ b✝).toList ++ v :: r.toList
state_after: no goals

tactic: simp
state_before: case h_1
α : Type u_1
v : α
r l✝ a✝ : RBNode α
x✝ : α
b✝ : RBNode α
⊢ (node red (node black a✝ x✝ b✝) v r).toList = (node red a✝ x✝ b✝).toList ++ v :: r.toList
state_after: no goals
Theorem: torusIntegral_succ
File: Mathlib/MeasureTheory/Integral/TorusIntegral.lean

tactic: simpa using torusIntegral_succAbove hf 0
state_before: n : ℕ
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f✝ g : (Fin n → ℂ) → E
c✝ : Fin n → ℂ
R✝ : Fin n → ℝ
f : (Fin (n + 1) → ℂ) → E
c : Fin (n + 1) → ℂ
R : Fin (n + 1) → ℝ
hf : TorusIntegrable f c R
⊢ (∯ (x : Fin (n + 1) → ℂ) in T(c, R), f x) =
    ∮ (x : ℂ) in C(c 0, R 0), ∯ (y : Fin n → ℂ) in T(c ∘ Fin.succ, R ∘ Fin.succ), f (Fin.cons x y)
state_after: no goals
Theorem: MeasureTheory.measurePreserving_piCongrLeft
File: Mathlib/MeasureTheory/Constructions/Pi.lean

tactic: refine (pi_eq fun s _ => ?_).symm
state_before: ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝² : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝¹ : ∀ (i : ι), SigmaFinite (μ i)
inst✝ : Fintype ι'
f : ι' ≃ ι
⊢ Measure.map (⇑(MeasurableEquiv.piCongrLeft α f)) (Measure.pi fun i' => μ (f i')) = Measure.pi μ
state_after: ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝² : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝¹ : ∀ (i : ι), SigmaFinite (μ i)
inst✝ : Fintype ι'
f : ι' ≃ ι
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
⊢ (Measure.map (⇑(MeasurableEquiv.piCongrLeft α f)) (Measure.pi fun i' => μ (f i'))) (univ.pi s) = ∏ i : ι, (μ i) (s i)

tactic: rw [MeasurableEquiv.map_apply, MeasurableEquiv.coe_piCongrLeft f,
  Equiv.piCongrLeft_preimage_univ_pi, pi_pi _ _, f.prod_comp (fun i => μ i (s i))]
state_before: ι : Type u_1
ι' : Type u_2
α : ι → Type u_3
inst✝² : Fintype ι
m✝ : (i : ι) → OuterMeasure (α i)
m : (i : ι) → MeasurableSpace (α i)
μ : (i : ι) → Measure (α i)
inst✝¹ : ∀ (i : ι), SigmaFinite (μ i)
inst✝ : Fintype ι'
f : ι' ≃ ι
s : (i : ι) → Set (α i)
x✝ : ∀ (i : ι), MeasurableSet (s i)
⊢ (Measure.map (⇑(MeasurableEquiv.piCongrLeft α f)) (Measure.pi fun i' => μ (f i'))) (univ.pi s) = ∏ i : ι, (μ i) (s i)
state_after: no goals
Theorem: isSimpleModule_iff_toSpanSingleton_surjective
File: Mathlib/RingTheory/SimpleModule.lean

tactic: obtain ⟨y, rfl⟩ := h x hx0 z
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Ring S
M : Type u_4
inst✝³ : AddCommGroup M
inst✝² : Module R M
m✝ : Submodule R M
N : Type u_5
inst✝¹ : AddCommGroup N
inst✝ : Module R N
x✝¹ : Nontrivial M ∧ ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
left✝ : Nontrivial M
h : ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
m : Submodule R M
ne_bot : ¬m = ⊥
x : M
hxm : x ∈ m
hx0 : x ≠ 0
z : M
x✝ : z ∈ ⊤
⊢ z ∈ m
state_after: case intro
ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Ring S
M : Type u_4
inst✝³ : AddCommGroup M
inst✝² : Module R M
m✝ : Submodule R M
N : Type u_5
inst✝¹ : AddCommGroup N
inst✝ : Module R N
x✝¹ : Nontrivial M ∧ ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
left✝ : Nontrivial M
h : ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
m : Submodule R M
ne_bot : ¬m = ⊥
x : M
hxm : x ∈ m
hx0 : x ≠ 0
y : R
x✝ : (LinearMap.toSpanSingleton R M x) y ∈ ⊤
⊢ (LinearMap.toSpanSingleton R M x) y ∈ m

tactic: exact m.smul_mem _ hxm
state_before: case intro
ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁵ : Ring R
inst✝⁴ : Ring S
M : Type u_4
inst✝³ : AddCommGroup M
inst✝² : Module R M
m✝ : Submodule R M
N : Type u_5
inst✝¹ : AddCommGroup N
inst✝ : Module R N
x✝¹ : Nontrivial M ∧ ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
left✝ : Nontrivial M
h : ∀ (x : M), x ≠ 0 → Function.Surjective ⇑(LinearMap.toSpanSingleton R M x)
m : Submodule R M
ne_bot : ¬m = ⊥
x : M
hxm : x ∈ m
hx0 : x ≠ 0
y : R
x✝ : (LinearMap.toSpanSingleton R M x) y ∈ ⊤
⊢ (LinearMap.toSpanSingleton R M x) y ∈ m
state_after: no goals
Theorem: AffineMap.homothety_continuous
File: Mathlib/Topology/Algebra/Affine.lean

tactic: suffices ⇑(homothety x t) = fun y => t • (y - x) + x by
  rw [this]
  exact ((continuous_id.sub continuous_const).const_smul _).add continuous_const
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
⊢ Continuous ⇑(homothety x t)
state_after: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
⊢ ⇑(homothety x t) = fun y => t • (y - x) + x

tactic: ext y
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
⊢ ⇑(homothety x t) = fun y => t • (y - x) + x
state_after: case h
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
y : F
⊢ (homothety x t) y = t • (y - x) + x

tactic: simp [homothety_apply]
state_before: case h
R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
y : F
⊢ (homothety x t) y = t • (y - x) + x
state_after: no goals

tactic: rw [this]
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
this : ⇑(homothety x t) = fun y => t • (y - x) + x
⊢ Continuous ⇑(homothety x t)
state_after: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
this : ⇑(homothety x t) = fun y => t • (y - x) + x
⊢ Continuous fun y => t • (y - x) + x

tactic: exact ((continuous_id.sub continuous_const).const_smul _).add continuous_const
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝⁷ : AddCommGroup E
inst✝⁶ : TopologicalSpace E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : TopologicalAddGroup F
inst✝² : CommRing R
inst✝¹ : Module R F
inst✝ : ContinuousConstSMul R F
x : F
t : R
this : ⇑(homothety x t) = fun y => t • (y - x) + x
⊢ Continuous fun y => t • (y - x) + x
state_after: no goals
Theorem: MeasureTheory.AEEqFun.comp_toGerm
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
g : β → γ
hg : Continuous g
f✝ : α →ₘ[μ] β
f : α → β
x✝ : AEStronglyMeasurable f μ
⊢ (comp g hg (mk f x✝)).toGerm = Germ.map g (mk f x✝).toGerm
state_after: no goals
Theorem: Set.range_diag
File: Mathlib/Data/Set/Prod.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
s t : Set α
⊢ (range fun x => (x, x)) = diagonal α
state_after: case h.mk
α : Type u_1
s t : Set α
x y : α
⊢ ((x, y) ∈ range fun x => (x, x)) ↔ (x, y) ∈ diagonal α

tactic: simp [diagonal, eq_comm]
state_before: case h.mk
α : Type u_1
s t : Set α
x y : α
⊢ ((x, y) ∈ range fun x => (x, x)) ↔ (x, y) ∈ diagonal α
state_after: no goals
Theorem: Monoid.CoprodI.Word.equivPair_head_smul_equivPair_tail
File: Mathlib/GroupTheory/CoprodI.lean

tactic: rw [← rcons_eq_smul, ← equivPair_symm, Equiv.symm_apply_apply]
state_before: ι : Type u_1
M : ι → Type u_2
inst✝³ : (i : ι) → Monoid (M i)
N : Type u_3
inst✝² : Monoid N
inst✝¹ : (i : ι) → DecidableEq (M i)
inst✝ : DecidableEq ι
i : ι
w : Word M
⊢ of ((equivPair i) w).head • ((equivPair i) w).tail = w
state_after: no goals
Theorem: Polynomial.X_pow_sub_X_sub_one_irreducible_rat
File: Mathlib/RingTheory/Polynomial/Selmer.lean

tactic: by_cases hn0 : n = 0
state_before: n : ℕ
hn1 : n ≠ 1
⊢ Irreducible (X ^ n - X - 1)
state_after: case pos
n : ℕ
hn1 : n ≠ 1
hn0 : n = 0
⊢ Irreducible (X ^ n - X - 1)

case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
⊢ Irreducible (X ^ n - X - 1)

tactic: have hp : (X ^ n - X - 1 : ℤ[X]) = trinomial 0 1 n (-1) (-1) 1 := by
  simp only [trinomial, C_neg, C_1]; ring
state_before: case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
⊢ Irreducible (X ^ n - X - 1)
state_after: case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
⊢ Irreducible (X ^ n - X - 1)

tactic: have hn : 1 < n := Nat.one_lt_iff_ne_zero_and_ne_one.mpr ⟨hn0, hn1⟩
state_before: case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
⊢ Irreducible (X ^ n - X - 1)
state_after: case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
⊢ Irreducible (X ^ n - X - 1)

tactic: have h := (IsPrimitive.Int.irreducible_iff_irreducible_map_cast ?_).mp
  (X_pow_sub_X_sub_one_irreducible hn1)
state_before: case neg
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
⊢ Irreducible (X ^ n - X - 1)
state_after: case neg.refine_2
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
h : Irreducible (map (Int.castRingHom ℚ) (X ^ n - X - 1))
⊢ Irreducible (X ^ n - X - 1)

case neg.refine_1
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
⊢ (X ^ n - X - 1).IsPrimitive

tactic: rw [hn0, pow_zero, sub_sub, add_comm, ← sub_sub, sub_self, zero_sub]
state_before: case pos
n : ℕ
hn1 : n ≠ 1
hn0 : n = 0
⊢ Irreducible (X ^ n - X - 1)
state_after: case pos
n : ℕ
hn1 : n ≠ 1
hn0 : n = 0
⊢ Irreducible (-X)

tactic: exact Associated.irreducible ⟨-1, mul_neg_one X⟩ irreducible_X
state_before: case pos
n : ℕ
hn1 : n ≠ 1
hn0 : n = 0
⊢ Irreducible (-X)
state_after: no goals

tactic: simp only [trinomial, C_neg, C_1]
state_before: n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
⊢ X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
state_after: n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
⊢ X ^ n - X - 1 = -1 * X ^ 0 + -1 * X ^ 1 + 1 * X ^ n

tactic: ring
state_before: n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
⊢ X ^ n - X - 1 = -1 * X ^ 0 + -1 * X ^ 1 + 1 * X ^ n
state_after: no goals

tactic: rwa [Polynomial.map_sub, Polynomial.map_sub, Polynomial.map_pow, Polynomial.map_one,
  Polynomial.map_X] at h
state_before: case neg.refine_2
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
h : Irreducible (map (Int.castRingHom ℚ) (X ^ n - X - 1))
⊢ Irreducible (X ^ n - X - 1)
state_after: no goals

tactic: exact hp.symm ▸ (trinomial_monic zero_lt_one hn).isPrimitive
state_before: case neg.refine_1
n : ℕ
hn1 : n ≠ 1
hn0 : ¬n = 0
hp : X ^ n - X - 1 = trinomial 0 1 n (-1) (-1) 1
hn : 1 < n
⊢ (X ^ n - X - 1).IsPrimitive
state_after: no goals
Theorem: Ring.exists_list_of_mem_closure
File: Mathlib/Deprecated/Subring.lean

tactic: refine List.recOn L1 neg_zero.symm fun hd tl ih ↦ ?_
state_before: R : Type u
inst✝¹ : Ring R
cR : Type u
inst✝ : CommRing cR
s : Set R
a : R
h : a ∈ closure s
b : R
ih : ∃ L, (∀ l ∈ L, ∀ x ∈ l, x ∈ s ∨ x = -1) ∧ (List.map List.prod L).sum = b
L1 : List (List R)
h1 : ∀ l ∈ L1, ∀ x ∈ l, x ∈ s ∨ x = -1
x✝ : AddGroup.InClosure (Monoid.Closure s) (List.map List.prod L1).sum
⊢ (List.map (fun x => -x.prod) L1).sum = -(List.map List.prod L1).sum
state_after: R : Type u
inst✝¹ : Ring R
cR : Type u
inst✝ : CommRing cR
s : Set R
a : R
h : a ∈ closure s
b : R
ih✝ : ∃ L, (∀ l ∈ L, ∀ x ∈ l, x ∈ s ∨ x = -1) ∧ (List.map List.prod L).sum = b
L1 : List (List R)
h1 : ∀ l ∈ L1, ∀ x ∈ l, x ∈ s ∨ x = -1
x✝ : AddGroup.InClosure (Monoid.Closure s) (List.map List.prod L1).sum
hd : List R
tl : List (List R)
ih : (List.map (fun x => -x.prod) tl).sum = -(List.map List.prod tl).sum
⊢ (List.map (fun x => -x.prod) (hd :: tl)).sum = -(List.map List.prod (hd :: tl)).sum

tactic: rw [List.map_cons, List.sum_cons, ih, List.map_cons, List.sum_cons, neg_add]
state_before: R : Type u
inst✝¹ : Ring R
cR : Type u
inst✝ : CommRing cR
s : Set R
a : R
h : a ∈ closure s
b : R
ih✝ : ∃ L, (∀ l ∈ L, ∀ x ∈ l, x ∈ s ∨ x = -1) ∧ (List.map List.prod L).sum = b
L1 : List (List R)
h1 : ∀ l ∈ L1, ∀ x ∈ l, x ∈ s ∨ x = -1
x✝ : AddGroup.InClosure (Monoid.Closure s) (List.map List.prod L1).sum
hd : List R
tl : List (List R)
ih : (List.map (fun x => -x.prod) tl).sum = -(List.map List.prod tl).sum
⊢ (List.map (fun x => -x.prod) (hd :: tl)).sum = -(List.map List.prod (hd :: tl)).sum
state_after: no goals

tactic: rw [List.map_append, List.sum_append]
state_before: R : Type u
inst✝¹ : Ring R
cR : Type u
inst✝ : CommRing cR
s : Set R
a : R
h : a ∈ closure s
r1 r2 : R
ih1 : ∃ L, (∀ l ∈ L, ∀ x ∈ l, x ∈ s ∨ x = -1) ∧ (List.map List.prod L).sum = r1
ih2 : ∃ L, (∀ l ∈ L, ∀ x ∈ l, x ∈ s ∨ x = -1) ∧ (List.map List.prod L).sum = r2
L1 : List (List R)
h1 : ∀ l ∈ L1, ∀ x ∈ l, x ∈ s ∨ x = -1
L2 : List (List R)
h2 : ∀ l ∈ L2, ∀ x ∈ l, x ∈ s ∨ x = -1
x✝¹ : AddGroup.InClosure (Monoid.Closure s) (List.map List.prod L1).sum
x✝ : AddGroup.InClosure (Monoid.Closure s) (List.map List.prod L2).sum
⊢ (List.map List.prod (L1 ++ L2)).sum = (List.map List.prod L1).sum + (List.map List.prod L2).sum
state_after: no goals
Theorem: Subring.unop_closure
File: Mathlib/Algebra/Ring/Subring/MulOpposite.lean

tactic: simp_rw [closure, unop_sInf, Set.preimage_setOf_eq, op_coe]
state_before: ι : Sort u_1
R : Type u_2
inst✝ : Ring R
s : Set Rᵐᵒᵖ
⊢ (closure s).unop = closure (MulOpposite.op ⁻¹' s)
state_after: ι : Sort u_1
R : Type u_2
inst✝ : Ring R
s : Set Rᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}

tactic: congr with a
state_before: ι : Sort u_1
R : Type u_2
inst✝ : Ring R
s : Set Rᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: case e_a.h
ι : Sort u_1
R : Type u_2
inst✝ : Ring R
s : Set Rᵐᵒᵖ
a : Subring R
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}

tactic: exact MulOpposite.op_surjective.forall
state_before: case e_a.h
ι : Sort u_1
R : Type u_2
inst✝ : Ring R
s : Set Rᵐᵒᵖ
a : Subring R
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: no goals
Theorem: inv_mul'
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : DivisionCommMonoid α
a b c d : α
⊢ (a * b)⁻¹ = a⁻¹ / b
state_after: no goals
Theorem: SimpleGraph.incMatrix_of_not_mem_incidenceSet
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

tactic: rw [incMatrix_apply, Set.indicator_of_not_mem h]
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
h : e ∉ G.incidenceSet a
⊢ incMatrix R G a e = 0
state_after: no goals