tasksource/leandojo huggingface dataset:
Theorem: MvPolynomial.aeval_comp_bind₁
File: Mathlib/Data/MvPolynomial/Monad.lean

tactic: ext1
state_before: σ : Type u_4
τ : Type u_3
R : Type u_1
S : Type u_2
T : Type ?u.1067210
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : Algebra R S
f : τ → S
g : σ → MvPolynomial τ R
⊢ AlgHom.comp (aeval f) (bind₁ g) = aeval fun i => ↑(aeval f) (g i)

tactic: apply aeval_bind₁
state_before: case hf
σ : Type u_4
τ : Type u_3
R : Type u_1
S : Type u_2
T : Type ?u.1067210
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
f✝ : σ → MvPolynomial τ R
inst✝ : Algebra R S
f : τ → S
g : σ → MvPolynomial τ R
i✝ : σ
⊢ ↑(AlgHom.comp (aeval f) (bind₁ g)) (X i✝) = ↑(aeval fun i => ↑(aeval f) (g i)) (X i✝)
Theorem: CategoryTheory.Subobject.isIso_iff_mk_eq_top
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: rw [← ofMkLEMk_comp h.le, Category.comp_id]
state_before: C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : mk f = ⊤
⊢ IsIso f

tactic: exact IsIso.of_iso (isoOfMkEqMk _ _ h)
state_before: C : Type u₁
inst✝² : Category C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category D
X Y : C
f : X ⟶ Y
inst✝ : Mono f
h : mk f = ⊤
⊢ IsIso (ofMkLEMk f (𝟙 Y) (_ : mk f ≤ ⊤))
Theorem: List.mapTR_loop_eq
File: src/lean/Init/Data/List/Basic.lean

tactic: induction as generalizing bs with
| nil => simp [mapTR.loop, map]
| cons a as ih =>
  simp [mapTR.loop, map]
  rw [ih (f a :: bs), reverse_cons, append_assoc]
  rfl
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
as : List α
bs : List β
⊢ mapTR.loop f as bs = reverse bs ++ map f as

tactic: simp [mapTR.loop, map]
state_before: case nil
α : Type u
β : Type v
γ : Type w
f : α → β
bs : List β
⊢ mapTR.loop f nil bs = reverse bs ++ map f nil

tactic: simp [mapTR.loop, map]
state_before: case cons
α : Type u
β : Type v
γ : Type w
f : α → β
a : α
as : List α
ih : ∀ (bs : List β), mapTR.loop f as bs = reverse bs ++ map f as
bs : List β
⊢ mapTR.loop f (a :: as) bs = reverse bs ++ map f (a :: as)

tactic: rw [ih (f a :: bs), reverse_cons, append_assoc]
state_before: case cons
α : Type u
β : Type v
γ : Type w
f : α → β
a : α
as : List α
ih : ∀ (bs : List β), mapTR.loop f as bs = reverse bs ++ map f as
bs : List β
⊢ mapTR.loop f as (f a :: bs) = reverse bs ++ f a :: map f as

tactic: rfl
state_before: case cons
α : Type u
β : Type v
γ : Type w
f : α → β
a : α
as : List α
ih : ∀ (bs : List β), mapTR.loop f as bs = reverse bs ++ map f as
bs : List β
⊢ reverse bs ++ (f a :: nil ++ map f as) = reverse bs ++ f a :: map f as
Theorem: Finset.weightedVSub_eq_linear_combination
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: simp [s.weightedVSub_apply, vsub_eq_sub, smul_sub, ← Finset.sum_smul, hw]
state_before: k : Type u_2
V : Type u_3
P : Type ?u.282378
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι✝ : Type ?u.283028
s✝ : Finset ι✝
ι₂ : Type ?u.283034
s₂ : Finset ι₂
ι : Type u_1
s : Finset ι
w : ι → k
p : ι → V
hw : Finset.sum s w = 0
⊢ ↑(weightedVSub s p) w = ∑ i in s, w i • p i
Theorem: CategoryTheory.MonoidalFunctor.mapAction_ε_inv_hom
File: Mathlib/RepresentationTheory/Action.lean

tactic: rw [← cancel_mono F.ε, IsIso.inv_hom_id, ← F.mapAction_toLaxMonoidalFunctor_ε_hom G,
  ← Action.comp_hom, IsIso.inv_hom_id, Action.id_hom]
state_before: V : Type (u + 1)
inst✝³ : LargeCategory V
W : Type (u + 1)
inst✝² : LargeCategory W
inst✝¹ : MonoidalCategory V
inst✝ : MonoidalCategory W
F : MonoidalFunctor V W
G : MonCat
⊢ (inv (mapAction F G).toLaxMonoidalFunctor.ε).hom = inv F.ε
Theorem: Polynomial.Chebyshev.algebraMap_eval_T
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean

tactic: rw [← aeval_algebraMap_apply_eq_algebraMap_eval, aeval_T]
state_before: R : Type u_2
A : Type u_1
inst✝² : CommRing R
inst✝¹ : CommRing A
inst✝ : Algebra R A
x : R
n : ℕ
⊢ ↑(algebraMap R A) (eval x (T R n)) = eval (↑(algebraMap R A) x) (T A n)
Theorem: IsPrimitiveRoot.pow
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: subst n
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
n a b : ℕ
hn : 0 < n
h : IsPrimitiveRoot ζ n
hprod : n = a * b
⊢ IsPrimitiveRoot (ζ ^ a) b

tactic: simp only [iff_def, ← pow_mul, h.pow_eq_one, eq_self_iff_true, true_and_iff]
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
a b : ℕ
hn : 0 < a * b
h : IsPrimitiveRoot ζ (a * b)
⊢ IsPrimitiveRoot (ζ ^ a) b

tactic: intro l hl
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
a b : ℕ
hn : 0 < a * b
h : IsPrimitiveRoot ζ (a * b)
⊢ ∀ (l : ℕ), ζ ^ (a * l) = 1 → b ∣ l

tactic: have ha0 : a ≠ 0 := left_ne_zero_of_mul hn.ne'
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
a b : ℕ
hn : 0 < a * b
h : IsPrimitiveRoot ζ (a * b)
l : ℕ
hl : ζ ^ (a * l) = 1
⊢ b ∣ l

tactic: rw [← mul_dvd_mul_iff_left ha0]
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
a b : ℕ
hn : 0 < a * b
h : IsPrimitiveRoot ζ (a * b)
l : ℕ
hl : ζ ^ (a * l) = 1
ha0 : a ≠ 0
⊢ b ∣ l

tactic: exact h.dvd_of_pow_eq_one _ hl
state_before: M : Type u_1
N : Type ?u.2327355
G : Type ?u.2327358
R : Type ?u.2327361
S : Type ?u.2327364
F : Type ?u.2327367
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
a b : ℕ
hn : 0 < a * b
h : IsPrimitiveRoot ζ (a * b)
l : ℕ
hl : ζ ^ (a * l) = 1
ha0 : a ≠ 0
⊢ a * b ∣ a * l
Theorem: Complex.norm_int_of_nonneg
File: Mathlib/Analysis/Complex/Basic.lean

tactic: rw [norm_int, ← Int.cast_abs, _root_.abs_of_nonneg hn]
state_before: E : Type ?u.189234
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
n : ℤ
hn : 0 ≤ n
⊢ ‖↑n‖ = ↑n
Theorem: sign_nonpos_iff
File: Mathlib/Data/Sign.lean

tactic: rcases lt_trichotomy 0 a with (h | h | h)
state_before: α : Type u_1
inst✝¹ : Zero α
inst✝ : LinearOrder α
a : α
⊢ ↑sign a ≤ 0 ↔ a ≤ 0

tactic: simp [h, h.not_le]
state_before: case inl
α : Type u_1
inst✝¹ : Zero α
inst✝ : LinearOrder α
a : α
h : 0 < a
⊢ ↑sign a ≤ 0 ↔ a ≤ 0

tactic: simp [←h]
state_before: case inr.inl
α : Type u_1
inst✝¹ : Zero α
inst✝ : LinearOrder α
a : α
h : 0 = a
⊢ ↑sign a ≤ 0 ↔ a ≤ 0

tactic: simp [h, h.le]
state_before: case inr.inr
α : Type u_1
inst✝¹ : Zero α
inst✝ : LinearOrder α
a : α
h : a < 0
⊢ ↑sign a ≤ 0 ↔ a ≤ 0
Theorem: Irrational.of_int_sub
File: Mathlib/Data/Real/Irrational.lean

tactic: rwa [Rat.cast_coe_int]
state_before: q : ℚ
x y : ℝ
m : ℤ
h : Irrational (↑m - x)
⊢ Irrational (↑↑m - x)
Theorem: frontier_compl
File: Mathlib/Topology/Basic.lean

tactic: simp only [frontier_eq_closure_inter_closure, compl_compl, inter_comm]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ frontier (sᶜ) = frontier s
Theorem: Int.gcd_mul_lcm
File: Mathlib/Data/Int/GCD.lean

tactic: rw [Int.gcd, Int.lcm, Nat.gcd_mul_lcm, natAbs_mul]
state_before: i j : ℤ
⊢ gcd i j * lcm i j = natAbs (i * j)
Theorem: StarConvex.mem
File: Mathlib/Analysis/Convex/Star.lean

tactic: obtain ⟨y, hy⟩ := h
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.10190
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y z : E
s : Set E
hs : StarConvex 𝕜 x s
h : Set.Nonempty s
⊢ x ∈ s

tactic: convert hs hy zero_le_one le_rfl (add_zero 1)
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.10190
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y✝ z : E
s : Set E
hs : StarConvex 𝕜 x s
y : E
hy : y ∈ s
⊢ x ∈ s

tactic: rw [one_smul, zero_smul, add_zero]
state_before: case h.e'_4
𝕜 : Type u_1
E : Type u_2
F : Type ?u.10190
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y✝ z : E
s : Set E
hs : StarConvex 𝕜 x s
y : E
hy : y ∈ s
⊢ x = 1 • x + 0 • y
Theorem: Nat.le_minFac
File: Mathlib/Data/Nat/Prime.lean

tactic: rintro rfl
state_before: m n : ℕ
h : n = 1 ∨ m ≤ minFac n
p : ℕ
pp : Prime p
d : p ∣ n
⊢ n = 1 → m ≤ p

tactic: cases pp.not_dvd_one d
state_before: m p : ℕ
pp : Prime p
h : 1 = 1 ∨ m ≤ minFac 1
d : p ∣ 1
⊢ m ≤ p
Theorem: omegaLimit_subset_closure_fw_image
File: Mathlib/Dynamics/OmegaLimit.lean

tactic: rw [omegaLimit_eq_iInter]
state_before: τ : Type u_1
α : Type u_3
β : Type u_2
ι : Type ?u.37203
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
u : Set τ
hu : u ∈ f
⊢ ω f ϕ s ⊆ closure (image2 ϕ u s)

tactic: intro _ hx
state_before: τ : Type u_1
α : Type u_3
β : Type u_2
ι : Type ?u.37203
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
u : Set τ
hu : u ∈ f
⊢ (⋂ (u : ↑f.sets), closure (image2 ϕ (↑u) s)) ⊆ closure (image2 ϕ u s)

tactic: rw [mem_iInter] at hx
state_before: τ : Type u_1
α : Type u_3
β : Type u_2
ι : Type ?u.37203
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
u : Set τ
hu : u ∈ f
a✝ : β
hx : a✝ ∈ ⋂ (u : ↑f.sets), closure (image2 ϕ (↑u) s)
⊢ a✝ ∈ closure (image2 ϕ u s)

tactic: exact hx ⟨u, hu⟩
state_before: τ : Type u_1
α : Type u_3
β : Type u_2
ι : Type ?u.37203
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
u : Set τ
hu : u ∈ f
a✝ : β
hx : ∀ (i : ↑f.sets), a✝ ∈ closure (image2 ϕ (↑i) s)
⊢ a✝ ∈ closure (image2 ϕ u s)
Theorem: List.Chain'.count_not_le_count_add_one
File: Mathlib/Data/Bool/Count.lean

tactic: cases' l with x l
state_before: l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) l
b : Bool
⊢ count (!b) l ≤ count b l + 1

tactic: obtain rfl | rfl : b = x ∨ b = !x := by simp only [Bool.eq_not_iff, em]
state_before: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
⊢ count (!b) (x :: l) ≤ count b (x :: l) + 1

tactic: exact zero_le _
state_before: case nil
b : Bool
hl : Chain' (fun x x_1 => x ≠ x_1) []
⊢ count (!b) [] ≤ count b [] + 1

tactic: simp only [Bool.eq_not_iff, em]
state_before: b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
⊢ b = x ∨ b = !x

tactic: rw [count_cons_of_ne b.not_ne_self, count_cons_self, hl.count_not, add_assoc]
state_before: case cons.inl
b : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (b :: l)
⊢ count (!b) (b :: l) ≤ count b (b :: l) + 1

tactic: exact add_le_add_left (Nat.mod_lt _ two_pos).le _
state_before: case cons.inl
b : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (b :: l)
⊢ count b l + length l % 2 ≤ count b l + (1 + 1)

tactic: rw [Bool.not_not, count_cons_self, count_cons_of_ne x.not_ne_self, hl.count_not]
state_before: case cons.inr
x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
⊢ count (!!x) (x :: l) ≤ count (!x) (x :: l) + 1

tactic: exact add_le_add_right (le_add_right le_rfl) _
state_before: case cons.inr
x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
⊢ count x l + 1 ≤ count x l + length l % 2 + 1
Theorem: neg_one_smul
File: Mathlib/Algebra/Module/Basic.lean

tactic: simp
state_before: α : Type ?u.111911
R : Type u_2
k : Type ?u.111917
S : Type ?u.111920
M : Type u_1
M₂ : Type ?u.111926
M₃ : Type ?u.111929
ι : Type ?u.111932
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r s : R
x✝ y x : M
⊢ -1 • x = -x
Theorem: FractionalIdeal.coe_nat_cast
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: induction n <;> simp [*, Nat.unaryCast]
state_before: R : Type u_2
inst✝² : CommRing R
S : Submonoid R
P : Type u_1
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
n : ℕ
⊢ ↑(Nat.unaryCast n) = ↑n
Theorem: PNat.XgcdType.start_v
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [start, v, XgcdType.a, XgcdType.b, w, z]
state_before: u : XgcdType
a b : ℕ+
⊢ v (start a b) = (↑a, ↑b)

tactic: have : succ 0 = 1 := rfl
state_before: u : XgcdType
a b : ℕ+
⊢ (succ 0 * succ (↑a - 1) + 0 * succ (↑b - 1), 0 * succ (↑a - 1) + succ 0 * succ (↑b - 1)) = (↑a, ↑b)

tactic: rw [this, one_mul, one_mul, zero_mul, zero_mul, zero_add, add_zero]
state_before: u : XgcdType
a b : ℕ+
this : succ 0 = 1
⊢ (succ 0 * succ (↑a - 1) + 0 * succ (↑b - 1), 0 * succ (↑a - 1) + succ 0 * succ (↑b - 1)) = (↑a, ↑b)

tactic: rw [← Nat.pred_eq_sub_one, ← Nat.pred_eq_sub_one]
state_before: u : XgcdType
a b : ℕ+
this : succ 0 = 1
⊢ (succ (↑a - 1), succ (↑b - 1)) = (↑a, ↑b)

tactic: rw [Nat.succ_pred_eq_of_pos a.pos, Nat.succ_pred_eq_of_pos b.pos]
state_before: u : XgcdType
a b : ℕ+
this : succ 0 = 1
⊢ (succ (pred ↑a), succ (pred ↑b)) = (↑a, ↑b)
Theorem: Ordinal.infinite_pigeonhole_card
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rcases le_mk_iff_exists_set.1 hθ with ⟨s, rfl⟩
state_before: α✝ : Type ?u.110625
r : α✝ → α✝ → Prop
β α : Type u
f : β → α
θ : Cardinal
hθ : θ ≤ (#β)
h₁ : ℵ₀ ≤ θ
h₂ : (#α) < cof (ord θ)
⊢ ∃ a, θ ≤ (#↑(f ⁻¹' {a}))

tactic: cases' infinite_pigeonhole (f ∘ Subtype.val : s → α) h₁ h₂ with a ha
state_before: case intro
α✝ : Type ?u.110625
r : α✝ → α✝ → Prop
β α : Type u
f : β → α
s : Set β
hθ : (#↑s) ≤ (#β)
h₁ : ℵ₀ ≤ (#↑s)
h₂ : (#α) < cof (ord (#↑s))
⊢ ∃ a, (#↑s) ≤ (#↑(f ⁻¹' {a}))

tactic: use a
state_before: case intro.intro
α✝ : Type ?u.110625
r : α✝ → α✝ → Prop
β α : Type u
f : β → α
s : Set β
hθ : (#↑s) ≤ (#β)
h₁ : ℵ₀ ≤ (#↑s)
h₂ : (#α) < cof (ord (#↑s))
a : α
ha : (#↑(f ∘ Subtype.val ⁻¹' {a})) = (#↑s)
⊢ ∃ a, (#↑s) ≤ (#↑(f ⁻¹' {a}))

tactic: rw [← ha, @preimage_comp _ _ _ Subtype.val f]
state_before: case intro.intro
α✝ : Type ?u.110625
r : α✝ → α✝ → Prop
β α : Type u
f : β → α
s : Set β
hθ : (#↑s) ≤ (#β)
h₁ : ℵ₀ ≤ (#↑s)
h₂ : (#α) < cof (ord (#↑s))
a : α
ha : (#↑(f ∘ Subtype.val ⁻¹' {a})) = (#↑s)
⊢ (#↑s) ≤ (#↑(f ⁻¹' {a}))

tactic: exact mk_preimage_of_injective _ _ Subtype.val_injective
state_before: case intro.intro
α✝ : Type ?u.110625
r : α✝ → α✝ → Prop
β α : Type u
f : β → α
s : Set β
hθ : (#↑s) ≤ (#β)
h₁ : ℵ₀ ≤ (#↑s)
h₂ : (#α) < cof (ord (#↑s))
a : α
ha : (#↑(f ∘ Subtype.val ⁻¹' {a})) = (#↑s)
⊢ (#↑(Subtype.val ⁻¹' (f ⁻¹' {a}))) ≤ (#↑(f ⁻¹' {a}))
Theorem: CategoryTheory.Biprod.inl_ofComponents
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: simp [Biprod.ofComponents]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasBinaryBiproducts C
X₁ X₂ Y₁ Y₂ : C
f₁₁ : X₁ ⟶ Y₁
f₁₂ : X₁ ⟶ Y₂
f₂₁ : X₂ ⟶ Y₁
f₂₂ : X₂ ⟶ Y₂
⊢ biprod.inl ≫ ofComponents f₁₁ f₁₂ f₂₁ f₂₂ = f₁₁ ≫ biprod.inl + f₁₂ ≫ biprod.inr
Theorem: PowerSeries.exists_coeff_ne_zero_iff_ne_zero
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: refine' not_iff_not.mp _
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
⊢ (∃ n, ↑(coeff R n) φ ≠ 0) ↔ φ ≠ 0

tactic: push_neg
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
⊢ (¬∃ n, ↑(coeff R n) φ ≠ 0) ↔ ¬φ ≠ 0

tactic: simp [PowerSeries.ext_iff]
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
⊢ (∀ (n : ℕ), ↑(coeff R n) φ = 0) ↔ φ = 0
Theorem: Finsupp.apply_total
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: apply Finsupp.induction_linear l <;> simp (config := { contextual := true })
state_before: α : Type u_4
M : Type u_2
N : Type ?u.300771
P : Type ?u.300774
R : Type u_1
S : Type ?u.300780
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.300872
M' : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v✝ : α → M
v' : α' → M'
f : M →ₗ[R] M'
v : α → M
l : α →₀ R
⊢ ↑f (↑(Finsupp.total α M R v) l) = ↑(Finsupp.total α M' R (↑f ∘ v)) l
Theorem: LinearIndependent.image
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: convert LinearIndependent.image_of_comp s f id hs
state_before: ι✝ : Type u'
ι' : Type ?u.254205
R : Type u_2
K : Type ?u.254211
M : Type u_3
M' : Type ?u.254217
M'' : Type ?u.254220
V : Type u
V' : Type ?u.254225
v : ι✝ → M
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : AddCommGroup M'
inst✝³ : AddCommGroup M''
inst✝² : Module R M
inst✝¹ : Module R M'
inst✝ : Module R M''
a b : R
x y : M
ι : Type u_1
s : Set ι
f : ι → M
hs : LinearIndependent R fun x => f ↑x
⊢ LinearIndependent R fun x => ↑x
Theorem: SimpleGraph.ConnectedComponent.iso_image_comp_eq_map_iff_eq_comp
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: refine' C.ind fun u => _
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
φ : G ≃g G'
v : V
v' : V'
C : ConnectedComponent G
⊢ connectedComponentMk G' (↑φ v) = map (RelEmbedding.toRelHom (RelIso.toRelEmbedding φ)) C ↔
    connectedComponentMk G v = C

tactic: simp only [Iso.reachable_iff, ConnectedComponent.map_mk, RelEmbedding.coe_toRelHom,
  RelIso.coe_toRelEmbedding, ConnectedComponent.eq]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
φ : G ≃g G'
v : V
v' : V'
C : ConnectedComponent G
u : V
⊢ connectedComponentMk G' (↑φ v) = map (RelEmbedding.toRelHom (RelIso.toRelEmbedding φ)) (connectedComponentMk G u) ↔
    connectedComponentMk G v = connectedComponentMk G u
Theorem: Set.subset_toFinset
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← Finset.coe_subset, coe_toFinset]
state_before: α : Type u_1
β : Type ?u.84381
γ : Type ?u.84384
s✝ t : Set α
s : Finset α
inst✝ : Fintype ↑t
⊢ s ⊆ toFinset t ↔ ↑s ⊆ t
Theorem: Equiv.Perm.support_congr
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: ext x
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : support f ⊆ support g
h' : ∀ (x : α), x ∈ support g → ↑f x = ↑g x
⊢ f = g

tactic: by_cases hx : x ∈ g.support
state_before: case H
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : support f ⊆ support g
h' : ∀ (x : α), x ∈ support g → ↑f x = ↑g x
x : α
⊢ ↑f x = ↑g x

tactic: exact h' x hx
state_before: case pos
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : support f ⊆ support g
h' : ∀ (x : α), x ∈ support g → ↑f x = ↑g x
x : α
hx : x ∈ support g
⊢ ↑f x = ↑g x

tactic: rw [not_mem_support.mp hx, ← not_mem_support]
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : support f ⊆ support g
h' : ∀ (x : α), x ∈ support g → ↑f x = ↑g x
x : α
hx : ¬x ∈ support g
⊢ ↑f x = ↑g x

tactic: exact fun H => hx (h H)
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : support f ⊆ support g
h' : ∀ (x : α), x ∈ support g → ↑f x = ↑g x
x : α
hx : ¬x ∈ support g
⊢ ¬x ∈ support f
Theorem: PosNum.bit1_of_bit1
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [add_one, bit0_of_bit0]
state_before: α : Type ?u.81357
n : PosNum
⊢ _root_.bit0 n + 1 = bit1 n

tactic: rfl
state_before: α : Type ?u.81357
n : PosNum
⊢ succ (bit0 n) = bit1 n
Theorem: Finset.offDiag_insert
File: Mathlib/Data/Finset/Prod.lean

tactic: rw [insert_eq, union_comm, offDiag_union (disjoint_singleton_right.2 has), offDiag_singleton,
  union_empty, union_right_comm]
state_before: α : Type u_1
β : Type ?u.129768
γ : Type ?u.129771
inst✝ : DecidableEq α
s t : Finset α
x : α × α
a : α
has : ¬a ∈ s
⊢ offDiag (insert a s) = offDiag s ∪ {a} ×ˢ s ∪ s ×ˢ {a}
Theorem: Algebra.adjoin_eq_range
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: rw [← Algebra.adjoin_range_eq_range_aeval, Subtype.range_coe]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type ?u.5139389
a a' a₁ a₂ : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝³ : CommSemiring R
inst✝² : CommSemiring S₁
p q : MvPolynomial σ R
inst✝¹ : Algebra R S₁
inst✝ : CommSemiring S₂
f : σ → S₁
s : Set S₁
⊢ Algebra.adjoin R s = AlgHom.range (aeval Subtype.val)
Theorem: Order.Icc_pred_right_of_not_isMin
File: Mathlib/Order/SuccPred/Basic.lean

tactic: rw [← Ici_inter_Iic, Iic_pred_of_not_isMin ha, Ici_inter_Iio]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : PredOrder α
a b : α
ha : ¬IsMin b
⊢ Icc a (pred b) = Ico a b
Theorem: Filter.BoundedAtFilter.mul
File: Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean

tactic: refine' (hf.mul hg).trans _
state_before: α : Type u_2
β : Type u_1
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
⊢ BoundedAtFilter l (f * g)

tactic: convert Asymptotics.isBigO_refl (E := ℝ) _ l
state_before: α : Type u_2
β : Type u_1
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
⊢ (fun x => OfNat.ofNat 1 x * OfNat.ofNat 1 x) =O[l] 1

tactic: simp
state_before: case h.e'_8.h
α : Type u_2
β : Type u_1
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
x✝ : α
⊢ OfNat.ofNat 1 x✝ = OfNat.ofNat 1 x✝ * OfNat.ofNat 1 x✝
Theorem: antilipschitzWith_iff_le_mul_dist
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

tactic: simp only [antilipschitzWith_iff_le_mul_nndist, dist_nndist]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1858
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
K : ℝ≥0
f : α → β
⊢ AntilipschitzWith K f ↔ ∀ (x y : α), dist x y ≤ ↑K * dist (f x) (f y)

tactic: norm_cast
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1858
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
K : ℝ≥0
f : α → β
⊢ (∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)) ↔ ∀ (x y : α), ↑(nndist x y) ≤ ↑K * ↑(nndist (f x) (f y))
Theorem: lTensorHomEquivHomLTensor_apply
File: Mathlib/LinearAlgebra/Contraction.lean

tactic: rw [← LinearEquiv.coe_toLinearMap, lTensorHomEquivHomLTensor_toLinearMap]
state_before: ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹³ : CommRing R
inst✝¹² : AddCommGroup M
inst✝¹¹ : AddCommGroup N
inst✝¹⁰ : AddCommGroup P
inst✝⁹ : AddCommGroup Q
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : Module R Q
inst✝⁴ : Free R M
inst✝³ : Module.Finite R M
inst✝² : Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
x : P ⊗[R] (M →ₗ[R] Q)
⊢ ↑(lTensorHomEquivHomLTensor R M P Q) x = ↑(lTensorHomToHomLTensor R M P Q) x
Theorem: Set.iUnion_of_singleton
File: Mathlib/Data/Set/Lattice.lean

tactic: simp [Set.ext_iff]
state_before: α✝ : Type ?u.165055
β : Type ?u.165058
γ : Type ?u.165061
ι : Sort ?u.165064
ι' : Sort ?u.165067
ι₂ : Sort ?u.165070
κ : ι → Sort ?u.165075
κ₁ : ι → Sort ?u.165080
κ₂ : ι → Sort ?u.165085
κ' : ι' → Sort ?u.165090
α : Type u_1
⊢ (⋃ (x : α), {x}) = univ
Theorem: Polynomial.support_ofFinsupp
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rw [support]
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q : R[X]
p : AddMonoidAlgebra R ℕ
⊢ support { toFinsupp := p } = p.support
Theorem: ConcaveOn.le_map_integral
File: Mathlib/Analysis/Convex/Integral.lean

tactic: simpa only [average_eq_integral] using
  hg.le_map_average hgc hsc (IsProbabilityMeasure.ne_zero μ) hfs hfi hgi
state_before: α : Type u_1
E : Type u_2
F : Type ?u.1701878
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ : MeasureTheory.Measure α
s : Set E
t : Set α
f : α → E
g : E → ℝ
C : ℝ
inst✝ : IsProbabilityMeasure μ
hg : ConcaveOn ℝ s g
hgc : ContinuousOn g s
hsc : IsClosed s
hfs : ∀ᵐ (x : α) ∂μ, f x ∈ s
hfi : Integrable f
hgi : Integrable (g ∘ f)
⊢ (∫ (x : α), g (f x) ∂μ) ≤ g (∫ (x : α), f x ∂μ)