tasksource/leandojo huggingface dataset:
Theorem: Convex.combo_interior_closure_subset_interior
File: Mathlib/Analysis/Convex/Topology.lean

tactic: rw [isOpen_interior.add_closure (b • s)]
state_before: ι : Type ?u.39791
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
a b : 𝕜
ha : 0 < a
hb : 0 ≤ b
hab : a + b = 1
⊢ interior (a • s) + closure (b • s) = interior (a • s) + b • s
Theorem: TopologicalSpace.IsSeparable.image
File: Mathlib/Topology/Bases.lean

tactic: rcases hs with ⟨c, c_count, hc⟩
state_before: α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
hs : IsSeparable s
f : α → β
hf : Continuous f
⊢ IsSeparable (f '' s)

tactic: refine' ⟨f '' c, c_count.image _, _⟩
state_before: case intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ IsSeparable (f '' s)

tactic: rw [image_subset_iff]
state_before: case intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ f '' s ⊆ _root_.closure (f '' c)

tactic: exact hc.trans (closure_subset_preimage_closure_image hf)
state_before: case intro.intro
α : Type u
t : TopologicalSpace α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ s ⊆ f ⁻¹' _root_.closure (f '' c)
Theorem: ZMod.ne_zero_iff_odd
File: Mathlib/Data/ZMod/Parity.lean

tactic: contrapose
state_before: case mpr
n : ℕ
⊢ Odd n → ↑n ≠ 0

tactic: simp [eq_zero_iff_even]
state_before: case mpr
n : ℕ
⊢ ¬↑n ≠ 0 → ¬Odd n
Theorem: Polynomial.coeff_smul
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p✝ q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
p : R[X]
n : ℕ
⊢ coeff (r • p) n = r • coeff p n

tactic: simp_rw [← ofFinsupp_smul, coeff]
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ coeff (r • { toFinsupp := toFinsupp✝ }) n = r • coeff { toFinsupp := toFinsupp✝ } n

tactic: exact Finsupp.smul_apply _ _ _
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : SMulZeroClass S R
r : S
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ ↑(r • toFinsupp✝) n = r • ↑toFinsupp✝ n
Theorem: ContinuousLinearMap.op_norm_le_of_lipschitz
File: Mathlib/Analysis/NormedSpace/OperatorNorm.lean

tactic: simpa only [dist_zero_right, f.map_zero] using hf.dist_le_mul x 0
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕜₃ : Type ?u.274096
E : Type u_3
Eₗ : Type ?u.274102
F : Type u_4
Fₗ : Type ?u.274108
G : Type ?u.274111
Gₗ : Type ?u.274114
𝓕 : Type ?u.274117
inst✝¹⁵ : SeminormedAddCommGroup E
inst✝¹⁴ : SeminormedAddCommGroup Eₗ
inst✝¹³ : SeminormedAddCommGroup F
inst✝¹² : SeminormedAddCommGroup Fₗ
inst✝¹¹ : SeminormedAddCommGroup G
inst✝¹⁰ : SeminormedAddCommGroup Gₗ
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NontriviallyNormedField 𝕜₂
inst✝⁷ : NontriviallyNormedField 𝕜₃
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜 Eₗ
inst✝⁴ : NormedSpace 𝕜₂ F
inst✝³ : NormedSpace 𝕜 Fₗ
inst✝² : NormedSpace 𝕜₃ G
inst✝¹ : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
f : E →SL[σ₁₂] F
K : ℝ≥0
hf : LipschitzWith K ↑f
x : E
⊢ ‖↑f x‖ ≤ ↑K * ‖x‖
Theorem: Subgroup.relindex_bot_right
File: Mathlib/GroupTheory/Index.lean

tactic: rw [relindex, subgroupOf_bot_eq_top, index_top]
state_before: G : Type u_1
inst✝ : Group G
H K L : Subgroup G
⊢ relindex H ⊥ = 1
Theorem: Polynomial.support_C_mul_X_pow'
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simpa only [C_mul_X_pow_eq_monomial] using support_monomial' n c
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
c : R
⊢ support (↑C c * X ^ n) ⊆ {n}
Theorem: Module.Ray.map_neg
File: Mathlib/LinearAlgebra/Ray.lean

tactic: induction' v using Module.Ray.ind with g hg
state_before: R : Type u_1
inst✝⁴ : StrictOrderedCommRing R
M : Type u_2
N : Type u_3
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
x y : M
f : M ≃ₗ[R] N
v : Ray R M
⊢ ↑(map f) (-v) = -↑(map f) v

tactic: simp
state_before: case h
R : Type u_1
inst✝⁴ : StrictOrderedCommRing R
M : Type u_2
N : Type u_3
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
x y : M
f : M ≃ₗ[R] N
g : M
hg : g ≠ 0
⊢ ↑(map f) (-rayOfNeZero R g hg) = -↑(map f) (rayOfNeZero R g hg)
Theorem: Metric.infDist_singleton
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [infDist, dist_edist]
state_before: ι : Sort ?u.59247
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ infDist x {y} = dist x y
Theorem: Rat.toNNRat_add
File: Mathlib/Data/Rat/NNRat.lean

tactic: simp [toNNRat, hq, hp, add_nonneg]
state_before: p q : ℚ
hq : 0 ≤ q
hp : 0 ≤ p
⊢ ↑(toNNRat (q + p)) = ↑(toNNRat q + toNNRat p)
Theorem: Finset.prod_to_list
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [Finset.prod, ← Multiset.coe_prod, ← Multiset.coe_map, Finset.coe_toList]
state_before: ι : Type ?u.290155
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
⊢ List.prod (List.map f (toList s)) = Finset.prod s f
Theorem: Equiv.Perm.zpow_aux
File: Mathlib/GroupTheory/Perm/Basic.lean

tactic: rw [zpow_negSucc]
state_before: α : Type u
β : Type v
p : α → Prop
f : Perm α
hf : ∀ (x : α), p x ↔ p (↑f x)
n : ℕ
⊢ ∀ (x : α), p x ↔ p (↑(f ^ Int.negSucc n) x)

tactic: exact inv_aux.1 (pow_aux hf)
state_before: α : Type u
β : Type v
p : α → Prop
f : Perm α
hf : ∀ (x : α), p x ↔ p (↑f x)
n : ℕ
⊢ ∀ (x : α), p x ↔ p (↑(f ^ (n + 1))⁻¹ x)
Theorem: le_map_add_map_div'
File: Mathlib/Algebra/Order/Hom/Basic.lean

tactic: simpa only [add_comm, map_div_rev, div_mul_cancel'] using map_mul_le_add f (x / y) y
state_before: ι : Type ?u.39551
F : Type u_2
α : Type u_3
β : Type u_1
γ : Type ?u.39563
δ : Type ?u.39566
inst✝² : Group α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ ↑f x ≤ ↑f y + ↑f (y / x)
Theorem: mulSalemSpencer_insert_of_lt
File: Mathlib/Combinatorics/Additive/SalemSpencer.lean

tactic: refine' mulSalemSpencer_insert.trans _
state_before: F : Type ?u.90423
α : Type u_1
β : Type ?u.90429
𝕜 : Type ?u.90432
E : Type ?u.90435
inst✝ : OrderedCancelCommMonoid α
s : Set α
a : α
hs : ∀ (i : α), i ∈ s → i < a
⊢ MulSalemSpencer (insert a s) ↔ MulSalemSpencer s ∧ ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → a * b = c * c → a = b

tactic: rw [← and_assoc]
state_before: F : Type ?u.90423
α : Type u_1
β : Type ?u.90429
𝕜 : Type ?u.90432
E : Type ?u.90435
inst✝ : OrderedCancelCommMonoid α
s : Set α
a : α
hs : ∀ (i : α), i ∈ s → i < a
⊢ (MulSalemSpencer s ∧
      (∀ ⦃b c : α⦄, b ∈ s → c ∈ s → a * b = c * c → a = b) ∧ ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → b * c = a * a → b = c) ↔
    MulSalemSpencer s ∧ ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → a * b = c * c → a = b

tactic: exact and_iff_left fun b c hb hc h => ((mul_lt_mul_of_lt_of_lt (hs _ hb) (hs _ hc)).ne h).elim
state_before: F : Type ?u.90423
α : Type u_1
β : Type ?u.90429
𝕜 : Type ?u.90432
E : Type ?u.90435
inst✝ : OrderedCancelCommMonoid α
s : Set α
a : α
hs : ∀ (i : α), i ∈ s → i < a
⊢ ((MulSalemSpencer s ∧ ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → a * b = c * c → a = b) ∧
      ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → b * c = a * a → b = c) ↔
    MulSalemSpencer s ∧ ∀ ⦃b c : α⦄, b ∈ s → c ∈ s → a * b = c * c → a = b
Theorem: UpperSet.mem_iSup_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rw [← SetLike.mem_coe, coe_iSup]
state_before: α : Type u_1
β : Type ?u.59414
γ : Type ?u.59417
ι : Sort u_2
κ : ι → Sort ?u.59425
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : ι → UpperSet α
⊢ (a ∈ ⨆ (i : ι), f i) ↔ ∀ (i : ι), a ∈ f i

tactic: exact mem_iInter
state_before: α : Type u_1
β : Type ?u.59414
γ : Type ?u.59417
ι : Sort u_2
κ : ι → Sort ?u.59425
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : ι → UpperSet α
⊢ (a ∈ ⋂ (i : ι), ↑(f i)) ↔ ∀ (i : ι), a ∈ f i
Theorem: Module.free_of_finite_type_torsion_free
File: Mathlib/LinearAlgebra/FreeModule/PID.lean

tactic: cases nonempty_fintype ι
state_before: ι : Type u_1
R : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
inst✝⁴ : IsPrincipalIdealRing R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
b : ι → M
inst✝¹ : _root_.Finite ι
s : ι → M
hs : span R (range s) = ⊤
inst✝ : NoZeroSMulDivisors R M
⊢ Free R M

tactic: obtain ⟨n, b⟩ : Σn, Basis (Fin n) R M := Module.basisOfFiniteTypeTorsionFree hs
state_before: case intro
ι : Type u_1
R : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
inst✝⁴ : IsPrincipalIdealRing R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
b : ι → M
inst✝¹ : _root_.Finite ι
s : ι → M
hs : span R (range s) = ⊤
inst✝ : NoZeroSMulDivisors R M
val✝ : Fintype ι
⊢ Free R M

tactic: exact Module.Free.of_basis b
state_before: case intro.mk
ι : Type u_1
R : Type u_3
inst✝⁶ : CommRing R
inst✝⁵ : IsDomain R
inst✝⁴ : IsPrincipalIdealRing R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
b✝ : ι → M
inst✝¹ : _root_.Finite ι
s : ι → M
hs : span R (range s) = ⊤
inst✝ : NoZeroSMulDivisors R M
val✝ : Fintype ι
n : ℕ
b : Basis (Fin n) R M
⊢ Free R M
Theorem: continuousWithinAt_Ioo_iff_Iio
File: Mathlib/Topology/Order/Basic.lean

tactic: simp only [ContinuousWithinAt, nhdsWithin_Ioo_eq_nhdsWithin_Iio h]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderClosedTopology α
a✝ b✝ : α
inst✝ : TopologicalSpace γ
a b : α
f : α → γ
h : a < b
⊢ ContinuousWithinAt f (Ioo a b) b ↔ ContinuousWithinAt f (Iio b) b
Theorem: CategoryTheory.CostructuredArrow.eq_mk
File: Mathlib/CategoryTheory/StructuredArrow.lean

tactic: cases f
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
T T' T'' : D
Y Y' : C
S : C ⥤ D
f : CostructuredArrow S T
⊢ f = mk f.hom

tactic: congr
state_before: case mk
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
T T' T'' : D
Y Y' : C
S : C ⥤ D
left✝ : C
right✝ : Discrete PUnit
hom✝ : S.obj left✝ ⟶ (Functor.fromPUnit T).obj right✝
⊢ { left := left✝, right := right✝, hom := hom✝ } = mk { left := left✝, right := right✝, hom := hom✝ }.hom
Theorem: Multiset.noncommProd_add
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: rcases s with ⟨⟩
state_before: F : Type ?u.83828
ι : Type ?u.83831
α : Type u_1
β : Type ?u.83837
γ : Type ?u.83840
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s t : Multiset α
comm : Set.Pairwise {x | x ∈ s + t} Commute
⊢ noncommProd (s + t) comm =
    noncommProd s (_ : Set.Pairwise {x | x ∈ s} Commute) * noncommProd t (_ : Set.Pairwise {x | x ∈ t} Commute)

tactic: rcases t with ⟨⟩
state_before: case mk
F : Type ?u.83828
ι : Type ?u.83831
α : Type u_1
β : Type ?u.83837
γ : Type ?u.83840
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s t : Multiset α
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quot.mk Setoid.r a✝ + t} Commute
⊢ noncommProd (Quot.mk Setoid.r a✝ + t) comm =
    noncommProd (Quot.mk Setoid.r a✝) (_ : Set.Pairwise {x | x ∈ Quot.mk Setoid.r a✝} Commute) *
      noncommProd t (_ : Set.Pairwise {x | x ∈ t} Commute)

tactic: simp
state_before: case mk.mk
F : Type ?u.83828
ι : Type ?u.83831
α : Type u_1
β : Type ?u.83837
γ : Type ?u.83840
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s t : Multiset α
a✝¹ a✝ : List α
comm : Set.Pairwise {x | x ∈ Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝} Commute
⊢ noncommProd (Quot.mk Setoid.r a✝¹ + Quot.mk Setoid.r a✝) comm =
    noncommProd (Quot.mk Setoid.r a✝¹) (_ : Set.Pairwise {x | x ∈ Quot.mk Setoid.r a✝¹} Commute) *
      noncommProd (Quot.mk Setoid.r a✝) (_ : Set.Pairwise {x | x ∈ Quot.mk Setoid.r a✝} Commute)
Theorem: InnerProductGeometry.angle_smul_smul
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: have : c * c ≠ 0 := mul_ne_zero hc hc
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ : V
c : ℝ
hc : c ≠ 0
x y : V
⊢ angle (c • x) (c • y) = angle x y

tactic: rw [angle, angle, real_inner_smul_left, inner_smul_right, norm_smul, norm_smul, Real.norm_eq_abs,
  mul_mul_mul_comm _ ‖x‖, abs_mul_abs_self, ← mul_assoc c c, mul_div_mul_left _ _ this]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ : V
c : ℝ
hc : c ≠ 0
x y : V
this : c * c ≠ 0
⊢ angle (c • x) (c • y) = angle x y
Theorem: FractionalIdeal.adjoinIntegral_eq_one_of_isUnit
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: set I := adjoinIntegral A⁰ x hx
state_before: R : Type ?u.114414
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x : K
hx : IsIntegral A x
hI : IsUnit (adjoinIntegral A⁰ x hx)
⊢ adjoinIntegral A⁰ x hx = 1

tactic: have mul_self : I * I = I := by apply coeToSubmodule_injective; simp
state_before: R : Type ?u.114414
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x : K
hx : IsIntegral A x
I : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx
hI : IsUnit I
⊢ I = 1

tactic: apply coeToSubmodule_injective
state_before: R : Type ?u.114414
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x : K
hx : IsIntegral A x
I : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx
hI : IsUnit I
⊢ I * I = I

tactic: simp
state_before: case a
R : Type ?u.114414
A : Type u_1
K : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : Algebra A K
inst✝ : IsFractionRing A K
x : K
hx : IsIntegral A x
I : FractionalIdeal A⁰ K := adjoinIntegral A⁰ x hx
hI : IsUnit I
⊢ (fun I => ↑I) (I * I) = (fun I => ↑I) I
Theorem: Array.append_data
File: Std/Data/Array/Init/Lemmas.lean

tactic: rw [← append_eq_append]
state_before: α : Type u_1
arr arr' : Array α
⊢ (arr ++ arr').data = arr.data ++ arr'.data

tactic: unfold Array.append
state_before: α : Type u_1
arr arr' : Array α
⊢ (Array.append arr arr').data = arr.data ++ arr'.data

tactic: rw [foldl_eq_foldl_data]
state_before: α : Type u_1
arr arr' : Array α
⊢ (foldl (fun r v => push r v) arr arr' 0 (size arr')).data = arr.data ++ arr'.data

tactic: induction arr'.data generalizing arr <;> simp [*]
state_before: α : Type u_1
arr arr' : Array α
⊢ (List.foldl (fun r v => push r v) arr arr'.data).data = arr.data ++ arr'.data
Theorem: Nat.div_eq_iff_eq_of_dvd_dvd
File: Mathlib/Data/Nat/Order/Lemmas.lean

tactic: constructor
state_before: a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
⊢ n / x = n / y ↔ x = y

tactic: intro h
state_before: case mp
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
⊢ n / x = n / y → x = y

tactic: rw [← mul_right_inj' hn]
state_before: case mp
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
h : n / x = n / y
⊢ x = y

tactic: apply Nat.eq_mul_of_div_eq_left (dvd_mul_of_dvd_left hy x)
state_before: case mp
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
h : n / x = n / y
⊢ n * x = n * y

tactic: rw [eq_comm, mul_comm, Nat.mul_div_assoc _ hy]
state_before: case mp
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
h : n / x = n / y
⊢ n * x / y = n

tactic: exact Nat.eq_mul_of_div_eq_right hx h
state_before: case mp
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
h : n / x = n / y
⊢ n = x * (n / y)

tactic: intro h
state_before: case mpr
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
⊢ x = y → n / x = n / y

tactic: rw [h]
state_before: case mpr
a b m n✝ k n x y : ℕ
hn : n ≠ 0
hx : x ∣ n
hy : y ∣ n
h : x = y
⊢ n / x = n / y
Theorem: Set.range_sigma_eq_iUnion_range
File: Mathlib/Data/Set/Lattice.lean

tactic: simp
state_before: α : Type u_2
β : Type u_3
γ✝ : Type ?u.148439
ι : Sort ?u.148442
ι' : Sort ?u.148445
ι₂ : Sort ?u.148448
κ : ι → Sort ?u.148453
κ₁ : ι → Sort ?u.148458
κ₂ : ι → Sort ?u.148463
κ' : ι' → Sort ?u.148468
γ : α → Type u_1
f : Sigma γ → β
⊢ ∀ (x : β), x ∈ range f ↔ x ∈ ⋃ (a : α), range fun b => f { fst := a, snd := b }
Theorem: Ideal.span_one
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rw [← Set.singleton_one, span_singleton_one]
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
⊢ span 1 = ⊤
Theorem: CategoryTheory.Limits.zero_of_to_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: ext
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
X : C
f : X ⟶ 0
⊢ f = 0
Theorem: Finset.pimage_some
File: Mathlib/Data/Finset/PImage.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
inst✝³ : DecidableEq β
f✝ g : α →. β
inst✝² : (x : α) → Decidable (f✝ x).Dom
inst✝¹ : (x : α) → Decidable (g x).Dom
s✝ t : Finset α
b : β
s : Finset α
f : α → β
inst✝ : (x : α) → Decidable (Part.some (f x)).Dom
⊢ pimage (fun x => Part.some (f x)) s = image f s

tactic: simp [eq_comm]
state_before: case a
α : Type u_1
β : Type u_2
inst✝³ : DecidableEq β
f✝ g : α →. β
inst✝² : (x : α) → Decidable (f✝ x).Dom
inst✝¹ : (x : α) → Decidable (g x).Dom
s✝ t : Finset α
b : β
s : Finset α
f : α → β
inst✝ : (x : α) → Decidable (Part.some (f x)).Dom
a✝ : β
⊢ a✝ ∈ pimage (fun x => Part.some (f x)) s ↔ a✝ ∈ image f s
Theorem: List.map_comp_map
File: Mathlib/Data/List/Basic.lean

tactic: ext l
state_before: ι : Type ?u.136607
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
g : β → γ
f : α → β
⊢ map g ∘ map f = map (g ∘ f)

tactic: rw [comp_map, Function.comp_apply]
state_before: case h.a.a
ι : Type ?u.136607
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
g : β → γ
f : α → β
l : List α
n✝ : ℕ
a✝ : γ
⊢ a✝ ∈ get? ((map g ∘ map f) l) n✝ ↔ a✝ ∈ get? (map (g ∘ f) l) n✝
Theorem: Matrix.scalar_inj
File: Mathlib/Data/Matrix/Basic.lean

tactic: constructor
state_before: l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r s : α
⊢ ↑(scalar n) r = ↑(scalar n) s ↔ r = s

tactic: intro h
state_before: case mp
l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r s : α
⊢ ↑(scalar n) r = ↑(scalar n) s → r = s

tactic: inhabit n
state_before: case mp
l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r s : α
h : ↑(scalar n) r = ↑(scalar n) s
⊢ r = s

tactic: rw [← scalar_apply_eq r (Inhabited.default (α := n)),
    ← scalar_apply_eq s (Inhabited.default (α := n)), h]
state_before: case mp
l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r s : α
h : ↑(scalar n) r = ↑(scalar n) s
inhabited_h : Inhabited n
⊢ r = s

tactic: rintro rfl
state_before: case mpr
l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r s : α
⊢ r = s → ↑(scalar n) r = ↑(scalar n) s

tactic: rfl
state_before: case mpr
l : Type ?u.458991
m : Type ?u.458994
n : Type u_1
o : Type ?u.459000
m' : o → Type ?u.459005
n' : o → Type ?u.459010
R : Type ?u.459013
S : Type ?u.459016
α : Type v
β : Type w
γ : Type ?u.459023
inst✝³ : Semiring α
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : Nonempty n
r : α
⊢ ↑(scalar n) r = ↑(scalar n) r
Theorem: FreeAlgebra.ι_ne_algebraMap
File: Mathlib/Algebra/FreeAlgebra.lean

tactic: let f0 : FreeAlgebra R X →ₐ[R] R := lift R 0
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
⊢ False

tactic: let f1 : FreeAlgebra R X →ₐ[R] R := lift R 1
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
⊢ False

tactic: have hf0 : f0 (ι R x) = 0 := lift_ι_apply _ _
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
f1 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 1
⊢ False

tactic: have hf1 : f1 (ι R x) = 1 := lift_ι_apply _ _
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
f1 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 1
hf0 : ↑f0 (ι R x) = 0
⊢ False

tactic: rw [h, f0.commutes, Algebra.id.map_eq_self] at hf0
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
f1 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 1
hf0 : ↑f0 (ι R x) = 0
hf1 : ↑f1 (ι R x) = 1
⊢ False

tactic: rw [h, f1.commutes, Algebra.id.map_eq_self] at hf1
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
f1 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 1
hf0 : r = 0
hf1 : ↑f1 (ι R x) = 1
⊢ False

tactic: exact zero_ne_one (hf0.symm.trans hf1)
state_before: R : Type u_1
inst✝³ : CommSemiring R
X : Type u_2
A : Type ?u.733161
inst✝² : Semiring A
inst✝¹ : Algebra R A
inst✝ : Nontrivial R
x : X
r : R
h : ι R x = ↑(algebraMap R (FreeAlgebra R X)) r
f0 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 0
f1 : FreeAlgebra R X →ₐ[R] R := ↑(lift R) 1
hf0 : r = 0
hf1 : r = 1
⊢ False
Theorem: UpperSet.mem_sInf_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp only [exists_prop, SetLike.mem_coe]
state_before: α : Type u_1
β : Type ?u.58938
γ : Type ?u.58941
ι : Sort ?u.58944
κ : ι → Sort ?u.58949
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
⊢ (∃ i j, a ∈ ↑i) ↔ ∃ s, s ∈ S ∧ a ∈ s
Theorem: Set.preimage_add_const_Ico
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ici_inter_Iio]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x + a) ⁻¹' Ico b c = Ico (b - a) (c - a)