tasksource/leandojo huggingface dataset:
Theorem: SimpleGraph.card_interedges_add_card_interedges_compl
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [← card_product, interedges_def, interedges_def]
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
⊢ card (interedges G s t) + card (interedges (Gᶜ) s t) = card s * card t

tactic: have : ((s ×ˢ t).filter fun e ↦ Gᶜ.Adj e.1 e.2) = (s ×ˢ t).filter fun e ↦ ¬G.Adj e.1 e.2 := by
  refine' filter_congr fun x hx ↦ _
  rw [mem_product] at hx
  rw [compl_adj, and_iff_right (h.forall_ne_finset hx.1 hx.2)]
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
⊢ card (filter (fun e => Adj G e.fst e.snd) (s ×ˢ t)) + card (filter (fun e => Adj (Gᶜ) e.fst e.snd) (s ×ˢ t)) =
    card (s ×ˢ t)

tactic: rw [this, ← card_union_eq, filter_union_filter_neg_eq]
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
this : filter (fun e => Adj (Gᶜ) e.fst e.snd) (s ×ˢ t) = filter (fun e => ¬Adj G e.fst e.snd) (s ×ˢ t)
⊢ card (filter (fun e => Adj G e.fst e.snd) (s ×ˢ t)) + card (filter (fun e => Adj (Gᶜ) e.fst e.snd) (s ×ˢ t)) =
    card (s ×ˢ t)

tactic: exact disjoint_filter.2 fun _ _ ↦ Classical.not_not.2
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
this : filter (fun e => Adj (Gᶜ) e.fst e.snd) (s ×ˢ t) = filter (fun e => ¬Adj G e.fst e.snd) (s ×ˢ t)
⊢ Disjoint (filter (fun e => Adj G e.fst e.snd) (s ×ˢ t)) (filter (fun e => ¬Adj G e.fst e.snd) (s ×ˢ t))

tactic: refine' filter_congr fun x hx ↦ _
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
⊢ filter (fun e => Adj (Gᶜ) e.fst e.snd) (s ×ˢ t) = filter (fun e => ¬Adj G e.fst e.snd) (s ×ˢ t)

tactic: rw [mem_product] at hx
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
x : α × α
hx : x ∈ s ×ˢ t
⊢ Adj (Gᶜ) x.fst x.snd ↔ ¬Adj G x.fst x.snd

tactic: rw [compl_adj, and_iff_right (h.forall_ne_finset hx.1 hx.2)]
state_before: 𝕜 : Type ?u.113206
ι : Type ?u.113209
κ : Type ?u.113212
α : Type u_1
β : Type ?u.113218
G : SimpleGraph α
inst✝¹ : DecidableRel G.Adj
s s₁ s₂ t t₁ t₂ : Finset α
a b : α
inst✝ : DecidableEq α
h : Disjoint s t
x : α × α
hx : x.fst ∈ s ∧ x.snd ∈ t
⊢ Adj (Gᶜ) x.fst x.snd ↔ ¬Adj G x.fst x.snd
Theorem: Representation.ofMulAction_apply
File: Mathlib/RepresentationTheory/Basic.lean

tactic: conv_lhs => rw [← smul_inv_smul g h]
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
⊢ ↑(↑(↑(ofMulAction k G H) g) f) h = ↑f (g⁻¹ • h)

tactic: let h' := g⁻¹ • h
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
⊢ ↑(↑(↑(ofMulAction k G H) g) f) (g • g⁻¹ • h) = ↑f (g⁻¹ • h)

tactic: change ofMulAction k G H g f (g • h') = f h'
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
⊢ ↑(↑(↑(ofMulAction k G H) g) f) (g • g⁻¹ • h) = ↑f (g⁻¹ • h)

tactic: simp only [ofMulAction_def, Finsupp.lmapDomain_apply, Finsupp.mapDomain_apply, hg]
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
hg : Function.Injective ((fun x x_1 => x • x_1) g)
⊢ ↑(↑(↑(ofMulAction k G H) g) f) (g • h') = ↑f h'

tactic: intro h₁ h₂
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
⊢ Function.Injective ((fun x x_1 => x • x_1) g)

tactic: simp
state_before: k : Type u_3
G : Type u_2
V : Type ?u.513125
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_1
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
h₁ h₂ : H
⊢ (fun x x_1 => x • x_1) g h₁ = (fun x x_1 => x • x_1) g h₂ → h₁ = h₂
Theorem: zpow_ne_zero_of_ne_zero
File: Mathlib/Algebra/GroupWithZero/Power.lean

tactic: rw [zpow_ofNat]
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
a : G₀
ha : a ≠ 0
a✝ : ℕ
⊢ a ^ ↑a✝ ≠ 0

tactic: exact pow_ne_zero _ ha
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
a : G₀
ha : a ≠ 0
a✝ : ℕ
⊢ a ^ a✝ ≠ 0

tactic: rw [zpow_negSucc]
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
a : G₀
ha : a ≠ 0
a✝ : ℕ
⊢ a ^ -[a✝+1] ≠ 0

tactic: exact inv_ne_zero (pow_ne_zero _ ha)
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
a : G₀
ha : a ≠ 0
a✝ : ℕ
⊢ (a ^ (a✝ + 1))⁻¹ ≠ 0
Theorem: SimpleGraph.card_neighborSet_union_compl_neighborSet
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: classical simp_rw [neighborSet_union_compl_neighborSet_eq, Set.toFinset_compl,
    Finset.card_compl, Set.toFinset_card, Set.card_singleton]
state_before: ι : Sort ?u.144589
𝕜 : Type ?u.144592
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
v : V
inst✝ : Fintype ↑(neighborSet G v ∪ neighborSet (Gᶜ) v)
⊢ card (Set.toFinset (neighborSet G v ∪ neighborSet (Gᶜ) v)) = Fintype.card V - 1

tactic: simp_rw [neighborSet_union_compl_neighborSet_eq, Set.toFinset_compl,
Finset.card_compl, Set.toFinset_card, Set.card_singleton]
state_before: ι : Sort ?u.144589
𝕜 : Type ?u.144592
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e : Sym2 V
inst✝¹ : Fintype V
G : SimpleGraph V
v : V
inst✝ : Fintype ↑(neighborSet G v ∪ neighborSet (Gᶜ) v)
⊢ card (Set.toFinset (neighborSet G v ∪ neighborSet (Gᶜ) v)) = Fintype.card V - 1
Theorem: Polynomial.card_roots_sub_C'
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: simp_all [lt_irrefl]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
hp0 : 0 < degree p
h : p = 0
⊢ False
Theorem: Finsupp.eq_single_iff
File: Mathlib/Data/Finsupp/Defs.lean

tactic: refine' ⟨fun h => h.symm ▸ ⟨support_single_subset, single_eq_same⟩, _⟩
state_before: α : Type u_1
β : Type ?u.54288
γ : Type ?u.54291
ι : Type ?u.54294
M : Type u_2
M' : Type ?u.54300
N : Type ?u.54303
P : Type ?u.54306
G : Type ?u.54309
H : Type ?u.54312
R : Type ?u.54315
S : Type ?u.54318
inst✝ : Zero M
a✝ a' : α
b✝ : M
f : α →₀ M
a : α
b : M
⊢ f = single a b ↔ f.support ⊆ {a} ∧ ↑f a = b

tactic: rintro ⟨h, rfl⟩
state_before: α : Type u_1
β : Type ?u.54288
γ : Type ?u.54291
ι : Type ?u.54294
M : Type u_2
M' : Type ?u.54300
N : Type ?u.54303
P : Type ?u.54306
G : Type ?u.54309
H : Type ?u.54312
R : Type ?u.54315
S : Type ?u.54318
inst✝ : Zero M
a✝ a' : α
b✝ : M
f : α →₀ M
a : α
b : M
⊢ f.support ⊆ {a} ∧ ↑f a = b → f = single a b

tactic: ext x
state_before: case intro
α : Type u_1
β : Type ?u.54288
γ : Type ?u.54291
ι : Type ?u.54294
M : Type u_2
M' : Type ?u.54300
N : Type ?u.54303
P : Type ?u.54306
G : Type ?u.54309
H : Type ?u.54312
R : Type ?u.54315
S : Type ?u.54318
inst✝ : Zero M
a✝ a' : α
b : M
f : α →₀ M
a : α
h : f.support ⊆ {a}
⊢ f = single a (↑f a)

tactic: by_cases hx : a = x <;> simp only [hx, single_eq_same, single_eq_of_ne, Ne.def, not_false_iff]
state_before: case intro.h
α : Type u_1
β : Type ?u.54288
γ : Type ?u.54291
ι : Type ?u.54294
M : Type u_2
M' : Type ?u.54300
N : Type ?u.54303
P : Type ?u.54306
G : Type ?u.54309
H : Type ?u.54312
R : Type ?u.54315
S : Type ?u.54318
inst✝ : Zero M
a✝ a' : α
b : M
f : α →₀ M
a : α
h : f.support ⊆ {a}
x : α
⊢ ↑f x = ↑(single a (↑f a)) x

tactic: exact not_mem_support_iff.1 (mt (fun hx => (mem_singleton.1 (h hx)).symm) hx)
state_before: case neg
α : Type u_1
β : Type ?u.54288
γ : Type ?u.54291
ι : Type ?u.54294
M : Type u_2
M' : Type ?u.54300
N : Type ?u.54303
P : Type ?u.54306
G : Type ?u.54309
H : Type ?u.54312
R : Type ?u.54315
S : Type ?u.54318
inst✝ : Zero M
a✝ a' : α
b : M
f : α →₀ M
a : α
h : f.support ⊆ {a}
x : α
hx : ¬a = x
⊢ ↑f x = 0
Theorem: MvPolynomial.support_X_mul
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: simp
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q : MvPolynomial σ R
s : σ
p : MvPolynomial σ R
⊢ ∀ (y : R), 1 * y = 0 ↔ y = 0
Theorem: Order.not_isSuccLimit_iff'
File: Mathlib/Order/SuccPred/Limit.lean

tactic: simp_rw [isSuccLimit_iff_succ_ne, not_forall, not_ne_iff]
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort ?u.8730
inst✝ : NoMaxOrder α
⊢ ¬IsSuccLimit a ↔ a ∈ range succ

tactic: rfl
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : SuccOrder α
a b : α
C : α → Sort ?u.8730
inst✝ : NoMaxOrder α
⊢ (∃ x, succ x = a) ↔ a ∈ range succ
Theorem: IsLocalization.submonoid_map_le_is_unit
File: Mathlib/RingTheory/Localization/InvSubmonoid.lean

tactic: rintro _ ⟨a, ha, rfl⟩
state_before: R : Type u_2
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_1
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type ?u.3304
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
⊢ Submonoid.map (algebraMap R S) M ≤ IsUnit.submonoid S

tactic: exact IsLocalization.map_units S ⟨_, ha⟩
state_before: case intro.intro
R : Type u_2
inst✝⁴ : CommRing R
M : Submonoid R
S : Type u_1
inst✝³ : CommRing S
inst✝² : Algebra R S
P : Type ?u.3304
inst✝¹ : CommRing P
inst✝ : IsLocalization M S
a : R
ha : a ∈ ↑M
⊢ ↑(algebraMap R S) a ∈ IsUnit.submonoid S
Theorem: Ordinal.enumOrd_zero
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [enumOrd_def]
state_before: S : Set Ordinal
⊢ enumOrd S 0 = sInf S

tactic: simp [Ordinal.not_lt_zero]
state_before: S : Set Ordinal
⊢ sInf (S ∩ {b | ∀ (c : Ordinal), c < 0 → enumOrd S c < b}) = sInf S
Theorem: Filter.map_top
File: Mathlib/Order/Filter/Basic.lean

tactic: rw [← principal_univ, map_principal, image_univ]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.249964
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m : α → β
m' : β → γ
s : Set α
t : Set β
f : α → β
⊢ map f ⊤ = 𝓟 (range f)
Theorem: group_separationRel
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: rw [this.closure_eq_preimage_closure_image, uniformity_eq_comap_nhds_one α, sInter_comap_sets]
state_before: α : Type u_1
β : Type ?u.178136
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
x y : α
this : Embedding fun a => a * (y / x)
⊢ (x, y) ∈ ⋂₀ (𝓤 α).sets ↔ x / y ∈ closure {1}

tactic: simp [mem_closure_iff_nhds, inter_singleton_nonempty, sub_eq_add_neg, add_assoc]
state_before: α : Type u_1
β : Type ?u.178136
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
x y : α
this : Embedding fun a => a * (y / x)
⊢ ((x, y) ∈ ⋂ (U : Set α) (_ : U ∈ 𝓝 1), (fun x => x.snd / x.fst) ⁻¹' U) ↔
    x / y ∈ (fun a => a * (y / x)) ⁻¹' closure ((fun a => a * (y / x)) '' {1})
Theorem: LinearMap.ker_zero
File: Mathlib/LinearAlgebra/Basic.lean

tactic: simp
state_before: R : Type u_2
R₁ : Type ?u.1248475
R₂ : Type u_3
R₃ : Type ?u.1248481
R₄ : Type ?u.1248484
S : Type ?u.1248487
K : Type ?u.1248490
K₂ : Type ?u.1248493
M : Type u_1
M' : Type ?u.1248499
M₁ : Type ?u.1248502
M₂ : Type u_4
M₃ : Type ?u.1248508
M₄ : Type ?u.1248511
N : Type ?u.1248514
N₂ : Type ?u.1248517
ι : Type ?u.1248520
V : Type ?u.1248523
V₂ : Type ?u.1248526
inst✝¹⁰ : Semiring R
inst✝⁹ : Semiring R₂
inst✝⁸ : Semiring R₃
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁴ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝³ : Module R M
inst✝² : Module R₂ M₂
inst✝¹ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type ?u.1248936
sc : SemilinearMapClass F τ₁₂ M M₂
x : M
⊢ x ∈ ker 0
Theorem: Equiv.Perm.sign_swap'
File: Mathlib/GroupTheory/Perm/Sign.lean

tactic: simp [H, swap_self]
state_before: α : Type u
β : Type v
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x y : α
H : x = y
⊢ ↑sign (swap x y) = if x = y then 1 else -1

tactic: simp [sign_swap H, H]
state_before: α : Type u
β : Type v
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x y : α
H : ¬x = y
⊢ ↑sign (swap x y) = if x = y then 1 else -1
Theorem: div_le_iff₀
File: Mathlib/Algebra/Order/WithZero.lean

tactic: rw [div_eq_mul_inv, mul_inv_le_iff₀ hc]
state_before: α : Type u_1
a b c d x y z : α
inst✝ : LinearOrderedCommGroupWithZero α
hc : c ≠ 0
⊢ a / c ≤ b ↔ a ≤ b * c
Theorem: Nat.two_le_iff
File: Mathlib/Data/Nat/Order/Basic.lean

tactic: simp
state_before: m n k l : ℕ
⊢ 2 ≤ 0 ↔ 0 ≠ 0 ∧ 0 ≠ 1

tactic: simp
state_before: m n k l : ℕ
⊢ 2 ≤ 1 ↔ 1 ≠ 0 ∧ 1 ≠ 1

tactic: simp
state_before: m n✝ k l n : ℕ
⊢ 2 ≤ n + 2 ↔ n + 2 ≠ 0 ∧ n + 2 ≠ 1
Theorem: DivisorChain.exists_chain_of_prime_pow
File: Mathlib/RingTheory/ChainOfDivisors.lean

tactic: refine' ⟨fun i => p ^ (i : ℕ), _, fun n m h => _, @fun y => ⟨fun h => _, _⟩⟩
state_before: M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
⊢ ∃ c, c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i

tactic: dsimp only
state_before: case refine'_1
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
⊢ (fun i => p ^ ↑i) 1 = p

tactic: rw [Fin.val_one', Nat.mod_eq_of_lt, pow_one]
state_before: case refine'_1
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
⊢ p ^ ↑1 = p

tactic: exact Nat.lt_succ_of_le (Nat.one_le_iff_ne_zero.mpr hn)
state_before: case refine'_1
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
⊢ 1 < n + 1

tactic: exact Associates.dvdNotUnit_iff_lt.mp
    ⟨pow_ne_zero n hp.ne_zero, p ^ (m - n : ℕ),
      not_isUnit_of_not_isUnit_dvd hp.not_unit (dvd_pow dvd_rfl (Nat.sub_pos_of_lt h).ne'),
      (pow_mul_pow_sub p h.le).symm⟩
state_before: case refine'_2
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n✝ : ℕ
hn : n✝ ≠ 0
hp : Prime p
n m : Fin (n✝ + 1)
h : n < m
⊢ (fun i => p ^ ↑i) n < (fun i => p ^ ↑i) m

tactic: obtain ⟨i, i_le, hi⟩ := (dvd_prime_pow hp n).1 h
state_before: case refine'_3
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
y : Associates M
h : y ≤ p ^ n
⊢ ∃ i, y = (fun i => p ^ ↑i) i

tactic: rw [associated_iff_eq] at hi
state_before: case refine'_3.intro.intro
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
y : Associates M
h : y ≤ p ^ n
i : ℕ
i_le : i ≤ n
hi : Associated y (p ^ i)
⊢ ∃ i, y = (fun i => p ^ ↑i) i

tactic: exact ⟨⟨i, Nat.lt_succ_of_le i_le⟩, hi⟩
state_before: case refine'_3.intro.intro
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
y : Associates M
h : y ≤ p ^ n
i : ℕ
i_le : i ≤ n
hi : y = p ^ i
⊢ ∃ i, y = (fun i => p ^ ↑i) i

tactic: rintro ⟨i, rfl⟩
state_before: case refine'_4
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
y : Associates M
⊢ (∃ i, y = (fun i => p ^ ↑i) i) → y ≤ p ^ n

tactic: exact ⟨p ^ (n - i : ℕ), (pow_mul_pow_sub p (Nat.succ_le_succ_iff.mp i.2)).symm⟩
state_before: case refine'_4.intro
M : Type u_1
inst✝ : CancelCommMonoidWithZero M
p : Associates M
n : ℕ
hn : n ≠ 0
hp : Prime p
i : Fin (n + 1)
⊢ (fun i => p ^ ↑i) i ≤ p ^ n
Theorem: Finset.prod_insert_of_eq_one_if_not_mem
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: by_cases hm : a ∈ s
state_before: ι : Type ?u.267066
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : ¬a ∈ s → f a = 1
⊢ ∏ x in insert a s, f x = ∏ x in s, f x

tactic: simp_rw [insert_eq_of_mem hm]
state_before: case pos
ι : Type ?u.267066
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : ¬a ∈ s → f a = 1
hm : a ∈ s
⊢ ∏ x in insert a s, f x = ∏ x in s, f x

tactic: rw [prod_insert hm, h hm, one_mul]
state_before: case neg
ι : Type ?u.267066
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
h : ¬a ∈ s → f a = 1
hm : ¬a ∈ s
⊢ ∏ x in insert a s, f x = ∏ x in s, f x
Theorem: Int.le_of_add_le_add_left
File: Std/Data/Int/Lemmas.lean

tactic: have : -a + (a + b) ≤ -a + (a + c) := Int.add_le_add_left h _
state_before: a b c : Int
h : a + b ≤ a + c
⊢ b ≤ c

tactic: simp [Int.neg_add_cancel_left] at this
state_before: a b c : Int
h : a + b ≤ a + c
this : -a + (a + b) ≤ -a + (a + c)
⊢ b ≤ c

tactic: assumption
state_before: a b c : Int
h : a + b ≤ a + c
this : b ≤ c
⊢ b ≤ c
Theorem: NormedAddGroupHom.lipschitz
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: rw [dist_eq_norm, dist_eq_norm, ← map_sub]
state_before: V : Type ?u.232658
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.232667
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x y : V₁
⊢ dist (↑f x) (↑f y) ≤ ↑{ val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } * dist x y

tactic: apply le_opNorm
state_before: V : Type ?u.232658
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.232667
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x y : V₁
⊢ ‖↑f (x - y)‖ ≤ ↑{ val := ‖f‖, property := (_ : 0 ≤ ‖f‖) } * ‖x - y‖
Theorem: Finsupp.card_Iio
File: Mathlib/Data/Finsupp/Interval.lean

tactic: rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : CanonicallyOrderedAddMonoid α
inst✝ : LocallyFiniteOrder α
f : ι →₀ α
⊢ card (Iio f) = ∏ i in f.support, card (Iic (↑f i)) - 1
Theorem: MeasureTheory.VectorMeasure.map_id
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: rw [map_apply v measurable_id hi, Set.preimage_id]
state_before: α : Type u_1
β : Type ?u.169501
m inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : TopologicalSpace M
v : VectorMeasure α M
i : Set α
hi : MeasurableSet i
⊢ ↑(map v id) i = ↑v i
Theorem: Function.surjective_of_right_cancellable_Prop
File: Mathlib/Logic/Function/Basic.lean

tactic: specialize h (fun y ↦ ∃ x, f x = y) (fun _ ↦ True) (funext fun x ↦ eq_true ⟨_, rfl⟩)
state_before: α : Sort u_1
β : Sort u_2
γ : Sort ?u.7146
f : α → β
h : ∀ (g₁ g₂ : β → Prop), g₁ ∘ f = g₂ ∘ f → g₁ = g₂
⊢ Surjective f

tactic: intro y
state_before: α : Sort u_1
β : Sort u_2
γ : Sort ?u.7146
f : α → β
h : (fun y => ∃ x, f x = y) = fun x => True
⊢ Surjective f

tactic: rw [congr_fun h y]
state_before: α : Sort u_1
β : Sort u_2
γ : Sort ?u.7146
f : α → β
h : (fun y => ∃ x, f x = y) = fun x => True
y : β
⊢ ∃ a, f a = y

tactic: trivial
state_before: α : Sort u_1
β : Sort u_2
γ : Sort ?u.7146
f : α → β
h : (fun y => ∃ x, f x = y) = fun x => True
y : β
⊢ True
Theorem: CategoryTheory.eqToIso_trans
File: Mathlib/CategoryTheory/EqToHom.lean

tactic: ext
state_before: C : Type u₁
inst✝ : Category C
X Y Z : C
p : X = Y
q : Y = Z
⊢ eqToIso p ≪≫ eqToIso q = eqToIso (_ : X = Z)

tactic: simp
state_before: case w
C : Type u₁
inst✝ : Category C
X Y Z : C
p : X = Y
q : Y = Z
⊢ (eqToIso p ≪≫ eqToIso q).hom = (eqToIso (_ : X = Z)).hom
Theorem: Isometry.diam_range
File: Mathlib/Topology/MetricSpace/Isometry.lean

tactic: rw [← image_univ]
state_before: ι : Type ?u.61000
α : Type u
β : Type v
γ : Type w
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f : α → β
hf : Isometry f
⊢ Metric.diam (range f) = Metric.diam univ

tactic: exact hf.diam_image univ
state_before: ι : Type ?u.61000
α : Type u
β : Type v
γ : Type w
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f : α → β
hf : Isometry f
⊢ Metric.diam (f '' univ) = Metric.diam univ
Theorem: NormedCommGroup.nhds_basis_norm_lt
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp_rw [← ball_eq']
state_before: 𝓕 : Type ?u.128861
𝕜 : Type ?u.128864
α : Type ?u.128867
ι : Type ?u.128870
κ : Type ?u.128873
E : Type u_1
F : Type ?u.128879
G : Type ?u.128882
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
x : E
⊢ HasBasis (𝓝 x) (fun ε => 0 < ε) fun ε => {y | ‖y / x‖ < ε}

tactic: exact Metric.nhds_basis_ball
state_before: 𝓕 : Type ?u.128861
𝕜 : Type ?u.128864
α : Type ?u.128867
ι : Type ?u.128870
κ : Type ?u.128873
E : Type u_1
F : Type ?u.128879
G : Type ?u.128882
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
x : E
⊢ HasBasis (𝓝 x) (fun ε => 0 < ε) fun ε => ball x ε
Theorem: Finset.disjoint_biUnion_right
File: Mathlib/Data/Finset/Basic.lean

tactic: simpa only [_root_.disjoint_comm] using disjoint_biUnion_left t f s
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.539269
inst✝ : DecidableEq β
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : α → Finset β
s : Finset β
t : Finset α
f : α → Finset β
⊢ _root_.Disjoint s (Finset.biUnion t f) ↔ ∀ (i : α), i ∈ t → _root_.Disjoint s (f i)
Theorem: Computation.mem_of_get_eq
File: Mathlib/Data/Seq/Computation.lean

tactic: intro h
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h : Terminates s
a : α
⊢ get s = a → a ∈ s

tactic: rw [← h]
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : Terminates s
a : α
h : get s = a
⊢ a ∈ s

tactic: apply get_mem
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
h✝ : Terminates s
a : α
h : get s = a
⊢ get s ∈ s
Theorem: openSegment_eq_image'
File: Mathlib/Analysis/Convex/Segment.lean

tactic: convert openSegment_eq_image 𝕜 x y using 2
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.80863
G : Type ?u.80866
ι : Type ?u.80869
π : ι → Type ?u.80874
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
⊢ openSegment 𝕜 x y = (fun θ => x + θ • (y - x)) '' Ioo 0 1

tactic: simp only [smul_sub, sub_smul, one_smul]
state_before: case h.e'_3.h
𝕜 : Type u_2
E : Type u_1
F : Type ?u.80863
G : Type ?u.80866
ι : Type ?u.80869
π : ι → Type ?u.80874
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
a✝¹ : 𝕜
a✝ : a✝¹ ∈ Ioo 0 1
⊢ x + a✝¹ • (y - x) = (1 - a✝¹) • x + a✝¹ • y

tactic: abel
state_before: case h.e'_3.h
𝕜 : Type u_2
E : Type u_1
F : Type ?u.80863
G : Type ?u.80866
ι : Type ?u.80869
π : ι → Type ?u.80874
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
a✝¹ : 𝕜
a✝ : a✝¹ ∈ Ioo 0 1
⊢ x + (a✝¹ • y - a✝¹ • x) = x - a✝¹ • x + a✝¹ • y
Theorem: List.unzip_swap
File: Mathlib/Data/List/Zip.lean

tactic: simp only [unzip_eq_map, map_map]
state_before: α : Type u
β : Type u_1
γ : Type ?u.85279
δ : Type ?u.85282
ε : Type ?u.85285
l : List (α × β)
⊢ unzip (map Prod.swap l) = Prod.swap (unzip l)

tactic: rfl
state_before: α : Type u
β : Type u_1
γ : Type ?u.85279
δ : Type ?u.85282
ε : Type ?u.85285
l : List (α × β)
⊢ (map (Prod.fst ∘ Prod.swap) l, map (Prod.snd ∘ Prod.swap) l) = Prod.swap (map Prod.fst l, map Prod.snd l)