tasksource/leandojo huggingface dataset:
Theorem: smul_add_smul_lt_smul_add_smul'
File: Mathlib/Algebra/Order/Module.lean

tactic: rw [add_comm (a • d), add_comm (a • c)]
state_before: k : Type u_2
M : Type u_1
N : Type ?u.81455
inst✝⁵ : OrderedRing k
inst✝⁴ : OrderedAddCommGroup M
inst✝³ : Module k M
inst✝² : OrderedSMul k M
a✝ b✝ : M
c✝ : k
inst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1
inst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1
a b : k
c d : M
hba : b < a
hdc : d < c
⊢ a • d + b • c < a • c + b • d

tactic: exact smul_add_smul_lt_smul_add_smul hba hdc
state_before: k : Type u_2
M : Type u_1
N : Type ?u.81455
inst✝⁵ : OrderedRing k
inst✝⁴ : OrderedAddCommGroup M
inst✝³ : Module k M
inst✝² : OrderedSMul k M
a✝ b✝ : M
c✝ : k
inst✝¹ : CovariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1
inst✝ : ContravariantClass M M (fun x x_1 => x + x_1) fun x x_1 => x < x_1
a b : k
c d : M
hba : b < a
hdc : d < c
⊢ b • c + a • d < b • d + a • c
Theorem: le_himp_iff'
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [le_himp_iff, inf_comm]
state_before: ι : Type ?u.26736
α : Type u_1
β : Type ?u.26742
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ≤ b ⇨ c ↔ b ⊓ a ≤ c
Theorem: isAlgebraic_int
File: Mathlib/RingTheory/Algebraic.lean

tactic: rw [← _root_.map_intCast (algebraMap R A)]
state_before: R : Type u
S : Type ?u.98877
A : Type v
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
inst✝⁵ : Ring A
inst✝⁴ : Algebra R A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : IsScalarTower R S A
inst✝ : Nontrivial R
n : ℤ
⊢ IsAlgebraic R ↑n

tactic: exact isAlgebraic_algebraMap (Int.cast n)
state_before: R : Type u
S : Type ?u.98877
A : Type v
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
inst✝⁵ : Ring A
inst✝⁴ : Algebra R A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : IsScalarTower R S A
inst✝ : Nontrivial R
n : ℤ
⊢ IsAlgebraic R (↑(algebraMap R A) ↑n)
Theorem: Num.ofZNum_toNat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← PosNum.to_nat_to_int p]
state_before: α : Type ?u.872397
p : PosNum
⊢ ↑(ofZNum (ZNum.pos p)) = toNat ↑p

tactic: rfl
state_before: α : Type ?u.872397
p : PosNum
⊢ ↑(ofZNum (ZNum.pos p)) = toNat ↑↑p

tactic: rw [← succ'_to_nat]
state_before: α : Type ?u.872397
p : PosNum
⊢ ↑(↑(PosNum.pred' p) + 1) = ↑p

tactic: simp
state_before: α : Type ?u.872397
p : PosNum
⊢ ↑↑(succ' (PosNum.pred' p)) = ↑p
Theorem: Fin.zero_succAbove
File: Mathlib/Data/Fin/Basic.lean

tactic: rfl
state_before: n✝ m n : ℕ
i : Fin n
⊢ ↑(succAbove 0) i = succ i
Theorem: Subtype.preimage_coe_eq_preimage_coe_iff
File: Mathlib/Data/Set/Image.lean

tactic: rw [← image_preimage_coe, ← image_preimage_coe, coe_injective.image_injective.eq_iff]
state_before: α : Type u_1
s t u : Set α
⊢ val ⁻¹' t = val ⁻¹' u ↔ t ∩ s = u ∩ s
Theorem: dvd_or_coprime
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: refine' or_iff_not_imp_left.2 fun h' => _
state_before: R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
x y : R
h : Irreducible x
⊢ x ∣ y ∨ IsCoprime x y

tactic: apply isCoprime_of_dvd
state_before: R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
x y : R
h : Irreducible x
h' : ¬x ∣ y
⊢ IsCoprime x y

tactic: rintro ⟨rfl, rfl⟩
state_before: case nonzero
R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
x y : R
h : Irreducible x
h' : ¬x ∣ y
⊢ ¬(x = 0 ∧ y = 0)

tactic: simp at h
state_before: case nonzero.intro
R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
h : Irreducible 0
h' : ¬0 ∣ 0
⊢ False

tactic: rintro z nu - ⟨w, rfl⟩ dy
state_before: case H
R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
x y : R
h : Irreducible x
h' : ¬x ∣ y
⊢ ∀ (z : R), z ∈ nonunits R → z ≠ 0 → z ∣ x → ¬z ∣ y

tactic: refine' h' (dvd_trans _ dy)
state_before: case H.intro
R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
y z : R
nu : z ∈ nonunits R
w : R
h : Irreducible (z * w)
h' : ¬z * w ∣ y
dy : z ∣ y
⊢ False

tactic: simpa using mul_dvd_mul_left z (isUnit_iff_dvd_one.1 <| (of_irreducible_mul h).resolve_left nu)
state_before: case H.intro
R : Type u
M : Type v
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : IsPrincipalIdealRing R
inst✝ : GCDMonoid R
y z : R
nu : z ∈ nonunits R
w : R
h : Irreducible (z * w)
h' : ¬z * w ∣ y
dy : z ∣ y
⊢ z * w ∣ z
Theorem: abs_min_sub_min_le_max
File: Mathlib/Algebra/Order/Group/MinMax.lean

tactic: simpa only [max_neg_neg, neg_sub_neg, abs_sub_comm] using
  abs_max_sub_max_le_max (-a) (-b) (-c) (-d)
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c d : α
⊢ abs (min a b - min c d) ≤ max (abs (a - c)) (abs (b - d))
Theorem: List.zip_swap
File: Mathlib/Data/List/Zip.lean

tactic: rw [zip_nil_right]
state_before: α : Type u
β : Type u_1
γ : Type ?u.5392
δ : Type ?u.5395
ε : Type ?u.5398
l₁ : List α
⊢ map Prod.swap (zip l₁ []) = zip [] l₁

tactic: rfl
state_before: α : Type u
β : Type u_1
γ : Type ?u.5392
δ : Type ?u.5395
ε : Type ?u.5398
l₁ : List α
⊢ map Prod.swap [] = zip [] l₁

tactic: simp only [zip_cons_cons, map_cons, zip_swap l₁ l₂, Prod.swap_prod_mk]
state_before: α : Type u
β : Type u_1
γ : Type ?u.5392
δ : Type ?u.5395
ε : Type ?u.5398
a : α
l₁ : List α
b : β
l₂ : List β
⊢ map Prod.swap (zip (a :: l₁) (b :: l₂)) = zip (b :: l₂) (a :: l₁)
Theorem: Turing.ListBlank.nth_succ
File: Mathlib/Computability/TuringMachine.lean

tactic: conv => lhs; rw [← ListBlank.cons_head_tail l]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
n : ℕ
⊢ nth l (n + 1) = nth (tail l) n

tactic: exact Quotient.inductionOn' l.tail fun l ↦ rfl
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
n : ℕ
⊢ nth (cons (head l) (tail l)) (n + 1) = nth (tail l) n
Theorem: IsPreconnected.iUnion_of_reflTransGen
File: Mathlib/Topology/Connected.lean

tactic: rw [← biUnion_univ]
state_before: α : Type u
β : Type v
ι✝ : Type ?u.8089
π : ι✝ → Type ?u.8094
inst✝ : TopologicalSpace α
s✝ t u v : Set α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsPreconnected (s i)
K : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j
⊢ IsPreconnected (⋃ (n : ι), s n)

tactic: exact IsPreconnected.biUnion_of_reflTransGen (fun i _ => H i) fun i _ j _ => by
  simpa [mem_univ] using K i j
state_before: α : Type u
β : Type v
ι✝ : Type ?u.8089
π : ι✝ → Type ?u.8094
inst✝ : TopologicalSpace α
s✝ t u v : Set α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsPreconnected (s i)
K : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j
⊢ IsPreconnected (⋃ (x : ι) (_ : x ∈ univ), s x)

tactic: simpa [mem_univ] using K i j
state_before: α : Type u
β : Type v
ι✝ : Type ?u.8089
π : ι✝ → Type ?u.8094
inst✝ : TopologicalSpace α
s✝ t u v : Set α
ι : Type u_1
s : ι → Set α
H : ∀ (i : ι), IsPreconnected (s i)
K : ∀ (i j : ι), ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j)) i j
i : ι
x✝¹ : i ∈ univ
j : ι
x✝ : j ∈ univ
⊢ ReflTransGen (fun i j => Set.Nonempty (s i ∩ s j) ∧ i ∈ univ) i j
Theorem: multiplicity.Finset.prod
File: Mathlib/RingTheory/Multiplicity.lean

tactic: induction' s using Finset.induction with a s has ih h
state_before: α : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
β : Type u_1
p : α
hp : Prime p
s : Finset β
f : β → α
⊢ multiplicity p (∏ x in s, f x) = ∑ x in s, multiplicity p (f x)

tactic: simp only [Finset.sum_empty, Finset.prod_empty]
state_before: case empty
α : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
β : Type u_1
p : α
hp : Prime p
f : β → α
⊢ multiplicity p (∏ x in ∅, f x) = ∑ x in ∅, multiplicity p (f x)

tactic: convert one_right hp.not_unit
state_before: case empty
α : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
β : Type u_1
p : α
hp : Prime p
f : β → α
⊢ multiplicity p 1 = 0

tactic: simp [has, ← ih]
state_before: case insert
α : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
β : Type u_1
p : α
hp : Prime p
f : β → α
a : β
s : Finset β
has : ¬a ∈ s
ih : multiplicity p (∏ x in s, f x) = ∑ x in s, multiplicity p (f x)
⊢ multiplicity p (∏ x in insert a s, f x) = ∑ x in insert a s, multiplicity p (f x)

tactic: convert multiplicity.mul hp
state_before: case insert
α : Type u_2
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
β : Type u_1
p : α
hp : Prime p
f : β → α
a : β
s : Finset β
has : ¬a ∈ s
ih : multiplicity p (∏ x in s, f x) = ∑ x in s, multiplicity p (f x)
⊢ multiplicity p (f a * ∏ x in s, f x) = multiplicity p (f a) + multiplicity p (∏ x in s, f x)
Theorem: Int.coe_nat_ne_zero
File: Mathlib/Data/Int/Order/Basic.lean

tactic: simp
state_before: n : ℕ
⊢ ↑n ≠ 0 ↔ n ≠ 0
Theorem: IsOpen.closure_mul
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rw [← inv_inv (closure s * t), mul_inv_rev, inv_closure, ht.inv.mul_closure, mul_inv_rev, inv_inv,
  inv_inv]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : TopologicalSpace α
inst✝¹ : Group α
inst✝ : TopologicalGroup α
s✝ t : Set α
ht : IsOpen t
s : Set α
⊢ closure s * t = s * t
Theorem: Equiv.option_symm_apply_none_iff
File: Mathlib/Logic/Equiv/Option.lean

tactic: simpa using (congr_arg e h).symm
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.5816
e : Option α ≃ Option β
h : ↑e.symm none = none
⊢ ↑e none = none

tactic: simpa using (congr_arg e.symm h).symm
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.5816
e : Option α ≃ Option β
h : ↑e none = none
⊢ ↑e.symm none = none
Theorem: Cycle.chain_singleton
File: Mathlib/Data/List/Cycle.lean

tactic: rw [chain_coe_cons, nil_append, List.chain_singleton]
state_before: α : Type u_1
r : α → α → Prop
a : α
⊢ Chain r ↑[a] ↔ r a a
Theorem: Multiset.toFinset_ssubset
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [Finset.ssubset_def, toFinset_subset]
state_before: α : Type u_1
β : Type ?u.453063
γ : Type ?u.453066
inst✝ : DecidableEq α
s t : Multiset α
⊢ toFinset s ⊂ toFinset t ↔ s ⊂ t

tactic: rfl
state_before: α : Type u_1
β : Type ?u.453063
γ : Type ?u.453066
inst✝ : DecidableEq α
s t : Multiset α
⊢ s ⊆ t ∧ ¬t ⊆ s ↔ s ⊂ t
Theorem: CategoryTheory.ε_inv_naturality
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: aesop_cat
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
X Y : C
f : X ⟶ Y
⊢ (MonoidalFunctor.εIso F).inv.app X ≫ (𝟙_ (C ⥤ C)).map f = (MonoidalFunctor.εIso F).inv.app X ≫ f
Theorem: Polynomial.map_mul
File: Mathlib/Data/Polynomial/Eval.lean

tactic: rw [map, eval₂_mul_noncomm]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
⊢ map f (p * q) = map f p * map f q

tactic: exact fun k => (commute_X _).symm
state_before: case hf
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
⊢ ∀ (k : ℕ), Commute (↑(RingHom.comp C f) (coeff q k)) X
Theorem: ball_one_mul_singleton
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

tactic: simp [ball_mul_singleton]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
⊢ ball 1 δ * {x} = ball x δ
Theorem: IsScalarTower.algebraMap_apply
File: Mathlib/Algebra/Algebra/Tower.lean

tactic: rw [algebraMap_eq R S A, RingHom.comp_apply]
state_before: R : Type u
S : Type v
A : Type w
B : Type u₁
M : Type v₁
inst✝¹⁰ : CommSemiring R
inst✝⁹ : CommSemiring S
inst✝⁸ : Semiring A
inst✝⁷ : Semiring B
inst✝⁶ : Algebra R S
inst✝⁵ : Algebra S A
inst✝⁴ : Algebra S B
inst✝³ : Algebra R A
inst✝² : Algebra R B
inst✝¹ : IsScalarTower R S A
inst✝ : IsScalarTower R S B
x : R
⊢ ↑(algebraMap R A) x = ↑(algebraMap S A) (↑(algebraMap R S) x)
Theorem: HahnSeries.coeff_order_ne_zero
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [order_of_ne hx]
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
inst✝ : Zero Γ
x : HahnSeries Γ R
hx : x ≠ 0
⊢ coeff x (order x) ≠ 0

tactic: exact x.isWf_support.min_mem (support_nonempty_iff.2 hx)
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
inst✝ : Zero Γ
x : HahnSeries Γ R
hx : x ≠ 0
⊢ coeff x (Set.IsWf.min (_ : Set.IsWf (support x)) (_ : Set.Nonempty (support x))) ≠ 0
Theorem: Filter.sdiff_limsup
File: Mathlib/Order/LiminfLimsup.lean

tactic: rw [← compl_inj_iff]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.176193
ι : Type ?u.176196
inst✝¹ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
inst✝ : NeBot f
a : α
⊢ a \ limsup u f = liminf (fun b => a \ u b) f
Theorem: MeasureTheory.SimpleFunc.finMeasSupp_iff
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
⊢ SimpleFunc.FinMeasSupp f μ ↔ ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤

tactic: refine' fun h y hy => lt_of_le_of_lt (measure_mono _) h
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
⊢ SimpleFunc.FinMeasSupp f μ → ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤

tactic: exact fun x hx (H : f x = 0) => hy <| H ▸ Eq.symm hx
state_before: case mp
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
h : SimpleFunc.FinMeasSupp f μ
y : β
hy : y ≠ 0
⊢ ↑f ⁻¹' {y} ⊆ {x | (fun x => ↑f x = OfNat.ofNat 0 x) x}ᶜ

tactic: intro H
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
⊢ (∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤) → SimpleFunc.FinMeasSupp f μ

tactic: rw [finMeasSupp_iff_support, support_eq]
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
H : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
⊢ SimpleFunc.FinMeasSupp f μ

tactic: refine' lt_of_le_of_lt (measure_biUnion_finset_le _ _) (sum_lt_top _)
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
H : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
⊢ ↑↑μ (⋃ (y : β) (_ : y ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f)), ↑f ⁻¹' {y}) < ⊤

tactic: exact fun y hy => (H y (Finset.mem_filter.1 hy).2).ne
state_before: case mpr
α : Type u_1
β : Type u_2
γ : Type ?u.906136
δ : Type ?u.906139
m : MeasurableSpace α
inst✝¹ : Zero β
inst✝ : Zero γ
μ : Measure α
f : α →ₛ β
H : ∀ (y : β), y ≠ 0 → ↑↑μ (↑f ⁻¹' {y}) < ⊤
⊢ ∀ (a : β), a ∈ filter (fun y => y ≠ 0) (SimpleFunc.range f) → ↑↑μ (↑f ⁻¹' {a}) ≠ ⊤
Theorem: Submodule.iSup_eq_range_dfinsupp_lsum
File: Mathlib/LinearAlgebra/Dfinsupp.lean

tactic: apply le_antisymm
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ iSup p = LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))

tactic: apply iSup_le _
state_before: case a
ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ iSup p ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))

tactic: intro i y hy
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ ∀ (i : ι), p i ≤ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))

tactic: simp only [LinearMap.mem_range, lsum_apply_apply]
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
y : N
hy : y ∈ p i
⊢ y ∈ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i))

tactic: exact ⟨Dfinsupp.single i ⟨y, hy⟩, Dfinsupp.sumAddHom_single _ _ _⟩
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
y : N
hy : y ∈ p i
⊢ ∃ y_1, ↑(sumAddHom fun i => LinearMap.toAddMonoidHom (Submodule.subtype (p i))) y_1 = y

tactic: rintro x ⟨v, rfl⟩
state_before: case a
ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ LinearMap.range (↑(lsum ℕ) fun i => Submodule.subtype (p i)) ≤ iSup p

tactic: exact dfinsupp_sumAddHom_mem _ v _ fun i _ => (le_iSup p i : p i ≤ _) (v i).2
state_before: case a.intro
ι : Type u_3
R : Type u_1
S : Type ?u.348674
M : ι → Type ?u.348679
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
v : Π₀ (i : ι), { x // x ∈ p i }
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) v ∈ iSup p
Theorem: Finsupp.mem_span_range_iff_exists_finsupp
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: simp only [← Finsupp.range_total, LinearMap.mem_range, Finsupp.total_apply]
state_before: α : Type u_3
M : Type u_1
N : Type ?u.375591
P : Type ?u.375594
R : Type u_2
S : Type ?u.375600
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.375692
M' : Type ?u.375695
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v✝ : α → M
v' : α' → M'
v : α → M
x : M
⊢ x ∈ span R (Set.range v) ↔ ∃ c, (sum c fun i a => a • v i) = x
Theorem: Set.image_list_prod
File: Mathlib/Data/Set/Pointwise/BigOperators.lean

tactic: rw [List.map_cons, List.prod_cons, List.prod_cons, image_mul, image_list_prod _ _]
state_before: ι : Type ?u.497
α : Type u_1
β : Type u_2
F : Type u_3
inst✝² : Monoid α
inst✝¹ : Monoid β
inst✝ : MonoidHomClass F α β
f : F
a : Set α
as : List (Set α)
⊢ ↑f '' List.prod (a :: as) = List.prod (List.map (fun s => ↑f '' s) (a :: as))
Theorem: Polynomial.support_erase
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
⊢ support (erase n p) = Finset.erase (support p) n

tactic: simp only [support, erase_def, Finsupp.support_erase]
state_before: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ support (erase n { toFinsupp := toFinsupp✝ }) = Finset.erase (support { toFinsupp := toFinsupp✝ }) n
Theorem: Part.some_div_some
File: Mathlib/Data/Part.lean

tactic: simp [div_def]
state_before: α : Type u_1
β : Type ?u.66572
γ : Type ?u.66575
inst✝ : Div α
a b : α
⊢ some a / some b = some (a / b)
Theorem: Ideal.mem_quotient_iff_mem
File: Mathlib/RingTheory/Ideal/QuotientOperations.lean

tactic: rw [mem_quotient_iff_mem_sup, sup_eq_left.mpr hIJ]
state_before: R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : CommRing S
I J : Ideal R
hIJ : I ≤ J
x : R
⊢ ↑(Quotient.mk I) x ∈ map (Quotient.mk I) J ↔ x ∈ J
Theorem: Multiset.toEnumFinset_filter_eq
File: Mathlib/Data/Multiset/Fintype.lean

tactic: ext ⟨y, i⟩
state_before: α : Type u_1
inst✝ : DecidableEq α
m✝ m : Multiset α
x : α
⊢ Finset.filter (fun p => x = p.fst) (toEnumFinset m) =
    Finset.map { toFun := Prod.mk x, inj' := (_ : Function.Injective (Prod.mk x)) } (Finset.range (count x m))

tactic: simp only [eq_comm, Finset.mem_filter, Multiset.mem_toEnumFinset, Finset.mem_map,
  Finset.mem_range, Function.Embedding.coeFn_mk, Prod.mk.inj_iff, exists_prop,
  exists_eq_right_right', and_congr_left_iff]
state_before: case a.mk
α : Type u_1
inst✝ : DecidableEq α
m✝ m : Multiset α
x y : α
i : ℕ
⊢ (y, i) ∈ Finset.filter (fun p => x = p.fst) (toEnumFinset m) ↔
    (y, i) ∈ Finset.map { toFun := Prod.mk x, inj' := (_ : Function.Injective (Prod.mk x)) } (Finset.range (count x m))

tactic: rintro rfl
state_before: case a.mk
α : Type u_1
inst✝ : DecidableEq α
m✝ m : Multiset α
x y : α
i : ℕ
⊢ x = y → (i < count y m ↔ i < count x m)

tactic: rfl
state_before: case a.mk
α : Type u_1
inst✝ : DecidableEq α
m✝ m : Multiset α
x : α
i : ℕ
⊢ i < count x m ↔ i < count x m
Theorem: one_le_pow_of_one_le'
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: simp
state_before: β : Type ?u.6110
A : Type ?u.6113
G : Type ?u.6116
M : Type u_1
R : Type ?u.6122
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
⊢ 1 ≤ a ^ 0

tactic: rw [pow_succ]
state_before: β : Type ?u.6110
A : Type ?u.6113
G : Type ?u.6116
M : Type u_1
R : Type ?u.6122
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
k : ℕ
⊢ 1 ≤ a ^ (k + 1)

tactic: exact one_le_mul H (one_le_pow_of_one_le' H k)
state_before: β : Type ?u.6110
A : Type ?u.6113
G : Type ?u.6116
M : Type u_1
R : Type ?u.6122
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
H : 1 ≤ a
k : ℕ
⊢ 1 ≤ a * a ^ k
Theorem: SimpleGraph.Subgraph.edgeSet_iInf
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: simp [iInf]
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G₁ G₂ : Subgraph G
a b : V
f : ι → Subgraph G
⊢ edgeSet (⨅ (i : ι), f i) = (⋂ (i : ι), edgeSet (f i)) ∩ SimpleGraph.edgeSet G
Theorem: image_commutatorSet_closureCommutatorRepresentatives
File: Mathlib/GroupTheory/Abelianization.lean

tactic: apply Set.Subset.antisymm
state_before: G : Type u
inst✝ : Group G
⊢ ↑(Subgroup.subtype (closureCommutatorRepresentatives G)) ''
      commutatorSet { x // x ∈ closureCommutatorRepresentatives G } =
    commutatorSet G

tactic: rintro - ⟨-, ⟨g₁, g₂, rfl⟩, rfl⟩
state_before: case h₁
G : Type u
inst✝ : Group G
⊢ ↑(Subgroup.subtype (closureCommutatorRepresentatives G)) ''
      commutatorSet { x // x ∈ closureCommutatorRepresentatives G } ⊆
    commutatorSet G

tactic: exact ⟨g₁, g₂, rfl⟩
state_before: case h₁.intro.intro.intro.intro
G : Type u
inst✝ : Group G
g₁ g₂ : { x // x ∈ closureCommutatorRepresentatives G }
⊢ ↑(Subgroup.subtype (closureCommutatorRepresentatives G)) ⁅g₁, g₂⁆ ∈ commutatorSet G

tactic: exact fun g hg =>
  ⟨_,
    ⟨⟨_, subset_closure (Or.inl ⟨_, ⟨⟨g, hg⟩, rfl⟩, rfl⟩)⟩,
      ⟨_, subset_closure (Or.inr ⟨_, ⟨⟨g, hg⟩, rfl⟩, rfl⟩)⟩, rfl⟩,
    hg.choose_spec.choose_spec⟩
state_before: case h₂
G : Type u
inst✝ : Group G
⊢ commutatorSet G ⊆
    ↑(Subgroup.subtype (closureCommutatorRepresentatives G)) ''
      commutatorSet { x // x ∈ closureCommutatorRepresentatives G }
Theorem: Stream'.even_cons_cons
File: Mathlib/Data/Stream/Init.lean

tactic: unfold even
state_before: α : Type u
β : Type v
δ : Type w
a₁ a₂ : α
s : Stream' α
⊢ even (a₁ :: a₂ :: s) = a₁ :: even s

tactic: rw [corec_eq]
state_before: α : Type u
β : Type v
δ : Type w
a₁ a₂ : α
s : Stream' α
⊢ corec (fun s => head s) (fun s => tail (tail s)) (a₁ :: a₂ :: s) =
    a₁ :: corec (fun s => head s) (fun s => tail (tail s)) s

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
a₁ a₂ : α
s : Stream' α
⊢ head (a₁ :: a₂ :: s) :: corec (fun s => head s) (fun s => tail (tail s)) (tail (tail (a₁ :: a₂ :: s))) =
    a₁ :: corec (fun s => head s) (fun s => tail (tail s)) s
Theorem: star_bit0
File: Mathlib/Algebra/Star/Basic.lean

tactic: simp [bit0]
state_before: R : Type u
inst✝¹ : AddMonoid R
inst✝ : StarAddMonoid R
r : R
⊢ star (bit0 r) = bit0 (star r)