1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Filter.HasBasis.mem_uniformity_iff
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: simp only [Prod.forall, subset_def]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
p : β → Prop
s : β → Set (α × α)
h : (𝓤 α).HasBasis p s
t : Set (α × α)
⊢ (∃ i, p i ∧ s i ⊆ t) ↔ ∃ i, p i ∧ ∀ (a b : α), (a, b) ∈ s i → (a, b) ∈ t
state_after: no goals
Theorem: preimage_mul_closedBall
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: ext c
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a✝ a₁ a₂ b✝ b₁ b₂ : E
r✝ r₁ r₂ : ℝ
a b : E
r : ℝ
⊢ (fun x => b * x) ⁻¹' closedBall a r = closedBall (a / b) r
state_after: case h
𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a✝ a₁ a₂ b✝ b₁ b₂ : E
r✝ r₁ r₂ : ℝ
a b : E
r : ℝ
c : E
⊢ c ∈ (fun x => b * x) ⁻¹' closedBall a r ↔ c ∈ closedBall (a / b) r

tactic: simp only [dist_eq_norm_div, Set.mem_preimage, mem_closedBall, div_div_eq_mul_div, mul_comm]
state_before: case h
𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a✝ a₁ a₂ b✝ b₁ b₂ : E
r✝ r₁ r₂ : ℝ
a b : E
r : ℝ
c : E
⊢ c ∈ (fun x => b * x) ⁻¹' closedBall a r ↔ c ∈ closedBall (a / b) r
state_after: no goals
Theorem: CategoryTheory.Limits.biproduct.toSubtype_fromSubtype
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

tactic: ext1 i
state_before: J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
⊢ toSubtype f p ≫ fromSubtype f p = map fun j => if p j then 𝟙 (f j) else 0
state_after: case w
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i

tactic: by_cases h : p i
state_before: case w
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i
state_after: case pos
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
h : p i
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i

case neg
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
h : ¬p i
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i

tactic: simp [h]
state_before: case pos
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
h : p i
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i
state_after: no goals

tactic: simp [h]
state_before: case neg
J : Type w
K : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
f : J → C
inst✝² : HasBiproduct f
p : J → Prop
inst✝¹ : HasBiproduct (Subtype.restrict p f)
inst✝ : DecidablePred p
i : J
h : ¬p i
⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i
state_after: no goals
Theorem: not_isMax_iff
File: Mathlib/Order/Max.lean

tactic: simp [lt_iff_le_not_le, IsMax, not_forall, exists_prop]
state_before: α : Type u_1
β : Type u_2
inst✝ : Preorder α
a b : α
⊢ ¬IsMax a ↔ ∃ b, a < b
state_after: no goals
Theorem: Measurable.map_prod_mk_left
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

tactic: apply measurable_of_measurable_coe
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
⊢ Measurable fun x => map (Prod.mk x) ν
state_after: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
⊢ ∀ (s : Set (α × β)), MeasurableSet s → Measurable fun b => (map (Prod.mk b) ν) s

tactic: intro s hs
state_before: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
⊢ ∀ (s : Set (α × β)), MeasurableSet s → Measurable fun b => (map (Prod.mk b) ν) s
state_after: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => (map (Prod.mk b) ν) s

tactic: simp_rw [map_apply measurable_prod_mk_left hs]
state_before: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => (map (Prod.mk b) ν) s
state_after: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ν (Prod.mk b ⁻¹' s)

tactic: exact measurable_measure_prod_mk_left hs
state_before: case h
α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
s : Set (α × β)
hs : MeasurableSet s
⊢ Measurable fun b => ν (Prod.mk b ⁻¹' s)
state_after: no goals
Theorem: FirstOrder.Language.Equiv.self_comp_symm
File: Mathlib/ModelTheory/Basic.lean

tactic: ext
state_before: L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : L.Structure M
inst✝² : L.Structure N
P : Type u_1
inst✝¹ : L.Structure P
Q : Type u_2
inst✝ : L.Structure Q
f : M ≃[L] N
⊢ f.comp f.symm = refl L N
state_after: case h
L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : L.Structure M
inst✝² : L.Structure N
P : Type u_1
inst✝¹ : L.Structure P
Q : Type u_2
inst✝ : L.Structure Q
f : M ≃[L] N
x✝ : N
⊢ (f.comp f.symm) x✝ = (refl L N) x✝

tactic: rw [comp_apply, apply_symm_apply, refl_apply]
state_before: case h
L : Language
L' : Language
M : Type w
N : Type w'
inst✝³ : L.Structure M
inst✝² : L.Structure N
P : Type u_1
inst✝¹ : L.Structure P
Q : Type u_2
inst✝ : L.Structure Q
f : M ≃[L] N
x✝ : N
⊢ (f.comp f.symm) x✝ = (refl L N) x✝
state_after: no goals
Theorem: Orientation.oangle_sub_right_eq_arcsin_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: have hs : (o.oangle y (y - x)).sign = 1 := by
  rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ o.oangle y (y - x) = ↑(Real.arcsin (‖x‖ / ‖y - x‖))
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle y (y - x)).sign = 1
⊢ o.oangle y (y - x) = ↑(Real.arcsin (‖x‖ / ‖y - x‖))

tactic: rw [o.oangle_eq_angle_of_sign_eq_one hs,
  InnerProductGeometry.angle_sub_eq_arcsin_of_inner_eq_zero
    (o.inner_rev_eq_zero_of_oangle_eq_pi_div_two h)
    (Or.inl (o.right_ne_zero_of_oangle_eq_pi_div_two h))]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
hs : (o.oangle y (y - x)).sign = 1
⊢ o.oangle y (y - x) = ↑(Real.arcsin (‖x‖ / ‖y - x‖))
state_after: no goals

tactic: rw [oangle_sign_sub_right_swap, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle y (y - x)).sign = 1
state_after: no goals
Theorem: LieSubalgebra.normalizer_eq_self_of_isCartanSubalgebra
File: Mathlib/Algebra/Lie/CartanSubalgebra.lean

tactic: rw [← LieSubmodule.coe_toSubmodule_eq_iff, coe_normalizer_eq_normalizer,
  IsCartanSubalgebra.self_normalizing, coe_toLieSubmodule]
state_before: R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
H✝ H : LieSubalgebra R L
inst✝ : H.IsCartanSubalgebra
⊢ H.toLieSubmodule.normalizer = H.toLieSubmodule
state_after: no goals
Theorem: Batteries.RBNode.mem_insert_self
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: rw [← mem_toList, List.mem_iff_append]
state_before: α : Type u_1
c : RBColor
n : Nat
v : α
cmp : α → α → Ordering
t : RBNode α
ht : t.Balanced c n
⊢ v ∈ insert cmp t v
state_after: α : Type u_1
c : RBColor
n : Nat
v : α
cmp : α → α → Ordering
t : RBNode α
ht : t.Balanced c n
⊢ ∃ s t_1, (insert cmp t v).toList = s ++ v :: t_1

tactic: exact match e : zoom (cmp v) t with
| (nil, p) => let ⟨_, _, _, h⟩ := exists_insert_toList_zoom_nil ht e; ⟨_, _, h⟩
| (node .., p) => let ⟨_, _, _, h⟩ := exists_insert_toList_zoom_node ht e; ⟨_, _, h⟩
state_before: α : Type u_1
c : RBColor
n : Nat
v : α
cmp : α → α → Ordering
t : RBNode α
ht : t.Balanced c n
⊢ ∃ s t_1, (insert cmp t v).toList = s ++ v :: t_1
state_after: no goals
Theorem: LinearMap.stdBasis_eq_pi_diag
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: ext x j
state_before: R : Type u_1
ι : Type u_2
inst✝³ : Semiring R
φ : ι → Type u_3
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i : ι
⊢ stdBasis R φ i = pi (diag i)
state_after: case h.h
R : Type u_1
ι : Type u_2
inst✝³ : Semiring R
φ : ι → Type u_3
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i : ι
x : φ i
j : ι
⊢ (stdBasis R φ i) x j = (pi (diag i)) x j

tactic: convert (update_apply (R := R) (φ := φ) (ι := ι) 0 x i j _).symm
state_before: case h.h
R : Type u_1
ι : Type u_2
inst✝³ : Semiring R
φ : ι → Type u_3
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i : ι
x : φ i
j : ι
⊢ (stdBasis R φ i) x j = (pi (diag i)) x j
state_after: case h.e'_2.h.e'_1
R : Type u_1
ι : Type u_2
inst✝³ : Semiring R
φ : ι → Type u_3
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i : ι
x : φ i
j : ι
⊢ x = id x

tactic: rfl
state_before: case h.e'_2.h.e'_1
R : Type u_1
ι : Type u_2
inst✝³ : Semiring R
φ : ι → Type u_3
inst✝² : (i : ι) → AddCommMonoid (φ i)
inst✝¹ : (i : ι) → Module R (φ i)
inst✝ : DecidableEq ι
i : ι
x : φ i
j : ι
⊢ x = id x
state_after: no goals
Theorem: Multiset.countP_eq_countP_filter_add
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [countP_filter]
state_before: case h.e'_3.h.e'_6
α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝² : DecidablePred p✝
s : Multiset α
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
l : List α
⊢ countP p (filter (fun a => ¬q a) (Quot.mk Setoid.r l)) =
    List.countP (fun x => decide (p x)) (List.filter (fun a => !decide (q a)) l)
state_after: no goals
Theorem: one_le_div_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [le_div_iff_of_neg hb, one_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hb : b < 0
⊢ 1 ≤ a / b ↔ a ≤ b
state_after: no goals
Theorem: ProbabilityTheory.toRatCDF_of_isRatStieltjesPoint
File: Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean

tactic: rw [toRatCDF, if_pos h]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
a : α
h : IsRatStieltjesPoint f a
q : ℚ
⊢ toRatCDF f a q = f a q
state_after: no goals
Theorem: eventually_residual
File: Mathlib/Topology/Baire/Lemmas.lean

tactic: simp only [Filter.Eventually, mem_residual, subset_def, mem_setOf_eq]
state_before: X : Type u_1
α : Type u_2
ι : Sort u_3
inst✝¹ : TopologicalSpace X
inst✝ : BaireSpace X
p : X → Prop
⊢ (∀ᶠ (x : X) in residual X, p x) ↔ ∃ t, IsGδ t ∧ Dense t ∧ ∀ x ∈ t, p x
state_after: X : Type u_1
α : Type u_2
ι : Sort u_3
inst✝¹ : TopologicalSpace X
inst✝ : BaireSpace X
p : X → Prop
⊢ (∃ t, (∀ x ∈ t, p x) ∧ IsGδ t ∧ Dense t) ↔ ∃ t, IsGδ t ∧ Dense t ∧ ∀ x ∈ t, p x

tactic: tauto
state_before: X : Type u_1
α : Type u_2
ι : Sort u_3
inst✝¹ : TopologicalSpace X
inst✝ : BaireSpace X
p : X → Prop
⊢ (∃ t, (∀ x ∈ t, p x) ∧ IsGδ t ∧ Dense t) ↔ ∃ t, IsGδ t ∧ Dense t ∧ ∀ x ∈ t, p x
state_after: no goals
Theorem: Nat.binomial_eq
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: simp [multinomial, Finset.sum_pair h, Finset.prod_pair h]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ multinomial {a, b} f = (f a + f b)! / ((f a)! * (f b)!)
state_after: no goals
Theorem: Ideal.squarefree_span_singleton
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: refine ⟨fun h x hx ↦ ?_, fun h I hI ↦ ?_⟩
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
⊢ Squarefree (span {a}) ↔ Squarefree a
state_after: case refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree (span {a})
x : R
hx : x * x ∣ a
⊢ IsUnit x

case refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree a
I : Ideal R
hI : I * I ∣ span {a}
⊢ IsUnit I

tactic: rw [← span_singleton_dvd_span_singleton_iff_dvd, ← span_singleton_mul_span_singleton] at hx
state_before: case refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree (span {a})
x : R
hx : x * x ∣ a
⊢ IsUnit x
state_after: case refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree (span {a})
x : R
hx : span {x} * span {x} ∣ span {a}
⊢ IsUnit x

tactic: simpa using h _ hx
state_before: case refine_1
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree (span {a})
x : R
hx : span {x} * span {x} ∣ span {a}
⊢ IsUnit x
state_after: no goals

tactic: rw [← span_singleton_generator I, span_singleton_mul_span_singleton,
  span_singleton_dvd_span_singleton_iff_dvd] at hI
state_before: case refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree a
I : Ideal R
hI : I * I ∣ span {a}
⊢ IsUnit I
state_after: case refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree a
I : Ideal R
hI : Submodule.IsPrincipal.generator I * Submodule.IsPrincipal.generator I ∣ a
⊢ IsUnit I

tactic: exact isUnit_iff.mpr <| eq_top_of_isUnit_mem _ (Submodule.IsPrincipal.generator_mem I) (h _ hI)
state_before: case refine_2
R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁴ : CommRing R
inst✝³ : CommRing A
inst✝² : Field K
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : Squarefree a
I : Ideal R
hI : Submodule.IsPrincipal.generator I * Submodule.IsPrincipal.generator I ∣ a
⊢ IsUnit I
state_after: no goals
Theorem: WithTop.LinearOrderedAddCommGroup.sub_top
File: Mathlib/Algebra/Order/Group/WithTop.lean

tactic: cases a <;> rfl
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b c d : α
a : WithTop α
⊢ a - ⊤ = ⊤
state_after: no goals
Theorem: Polynomial.le_rootMultiplicity_iff
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: rw [rootMultiplicity_eq_nat_find_of_nonzero p0, @Nat.le_find_iff _ (_)]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p
state_after: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p

tactic: simp_rw [Classical.not_not]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ m < n, ¬¬(X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p
state_after: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p

tactic: refine ⟨fun h => ?_, fun h m hm => (pow_dvd_pow _ hm).trans h⟩
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
⊢ (∀ m < n, (X - C a) ^ (m + 1) ∣ p) ↔ (X - C a) ^ n ∣ p
state_after: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ m < n, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ n ∣ p

tactic: cases' n with n
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ m < n, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ n ∣ p
state_after: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ m < 0, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ 0 ∣ p

case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ m < n + 1, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ (n + 1) ∣ p

tactic: rw [pow_zero]
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ m < 0, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ 0 ∣ p
state_after: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ m < 0, (X - C a) ^ (m + 1) ∣ p
⊢ 1 ∣ p

tactic: apply one_dvd
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
h : ∀ m < 0, (X - C a) ^ (m + 1) ∣ p
⊢ 1 ∣ p
state_after: no goals

tactic: exact h n n.lt_succ_self
state_before: case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝ : CommRing R
p : R[X]
p0 : p ≠ 0
a : R
n : ℕ
h : ∀ m < n + 1, (X - C a) ^ (m + 1) ∣ p
⊢ (X - C a) ^ (n + 1) ∣ p
state_after: no goals
Theorem: List.nodup_permutations'Aux_of_not_mem
File: Mathlib/Data/List/Perm.lean

tactic: induction' s with y s IH
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
s : List α
x : α
hx : x ∉ s
⊢ (permutations'Aux x s).Nodup
state_after: case nil
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x : α
hx : x ∉ []
⊢ (permutations'Aux x []).Nodup

case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : x ∉ y :: s
⊢ (permutations'Aux x (y :: s)).Nodup

tactic: simp
state_before: case nil
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x : α
hx : x ∉ []
⊢ (permutations'Aux x []).Nodup
state_after: no goals

tactic: simp only [not_or, mem_cons] at hx
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : x ∉ y :: s
⊢ (permutations'Aux x (y :: s)).Nodup
state_after: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (permutations'Aux x (y :: s)).Nodup

tactic: simp only [permutations'Aux, nodup_cons, mem_map, cons.injEq, exists_eq_right_right, not_and]
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (permutations'Aux x (y :: s)).Nodup
state_after: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (y :: s ∈ permutations'Aux x s → ¬y = x) ∧ (map (cons y) (permutations'Aux x s)).Nodup

tactic: refine ⟨fun _ => Ne.symm hx.left, ?_⟩
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (y :: s ∈ permutations'Aux x s → ¬y = x) ∧ (map (cons y) (permutations'Aux x s)).Nodup
state_after: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (map (cons y) (permutations'Aux x s)).Nodup

tactic: rw [nodup_map_iff]
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (map (cons y) (permutations'Aux x s)).Nodup
state_after: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (permutations'Aux x s).Nodup

case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ Function.Injective (cons y)

tactic: exact IH hx.right
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ (permutations'Aux x s).Nodup
state_after: no goals

tactic: simp
state_before: case cons
α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a x y : α
s : List α
IH : x ∉ s → (permutations'Aux x s).Nodup
hx : ¬x = y ∧ x ∉ s
⊢ Function.Injective (cons y)
state_after: no goals