tasksource/leandojo huggingface dataset:
Theorem: FreeAbelianGroup.map_comp_apply
File: Mathlib/GroupTheory/FreeAbelianGroup.lean

tactic: rw [map_comp]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
x : FreeAbelianGroup α
⊢ ↑(map (g ∘ f)) x = ↑(map g) (↑(map f) x)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
g : β → γ
x : FreeAbelianGroup α
⊢ ↑(AddMonoidHom.comp (map g) (map f)) x = ↑(map g) (↑(map f) x)
Theorem: MulAction.injective_ofQuotientStabilizer
File: Mathlib/GroupTheory/GroupAction/Quotient.lean

tactic: rw [leftRel_apply]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² inst✝¹ : Group α
inst✝ : MulAction α β
x : β
y₁ y₂ : α ⧸ stabilizer α x
g₁ g₂ : α
H : g₁ • x = g₂ • x
⊢ Setoid.r g₁ g₂

tactic: show (g₁⁻¹ * g₂) • x = x
state_before: α : Type u
β : Type v
γ : Type w
inst✝² inst✝¹ : Group α
inst✝ : MulAction α β
x : β
y₁ y₂ : α ⧸ stabilizer α x
g₁ g₂ : α
H : g₁ • x = g₂ • x
⊢ g₁⁻¹ * g₂ ∈ stabilizer α x

tactic: rw [mul_smul, ← H, inv_smul_smul]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² inst✝¹ : Group α
inst✝ : MulAction α β
x : β
y₁ y₂ : α ⧸ stabilizer α x
g₁ g₂ : α
H : g₁ • x = g₂ • x
⊢ (g₁⁻¹ * g₂) • x = x
Theorem: IsDedekindDomain.exists_forall_sub_mem_ideal
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: obtain ⟨y, hy⟩ :=
  IsDedekindDomain.exists_representative_mod_finset P e prime coprime fun i =>
    Ideal.Quotient.mk _ (x i)
state_before: R : Type u_2
A : Type ?u.1320972
K : Type ?u.1320975
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ι : Type u_1
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ (i : ι), i ∈ s → Prime (P i)
coprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j
x : { x // x ∈ s } → R
⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), y - x { val := i, property := hi } ∈ P i ^ e i

tactic: exact ⟨y, fun i hi => Ideal.Quotient.eq.mp (hy i hi)⟩
state_before: case intro
R : Type u_2
A : Type ?u.1320972
K : Type ?u.1320975
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Field K
inst✝² : IsDomain A
inst✝¹ : IsDomain R
inst✝ : IsDedekindDomain R
ι : Type u_1
s : Finset ι
P : ι → Ideal R
e : ι → ℕ
prime : ∀ (i : ι), i ∈ s → Prime (P i)
coprime : ∀ (i : ι), i ∈ s → ∀ (j : ι), j ∈ s → i ≠ j → P i ≠ P j
x : { x // x ∈ s } → R
y : R
hy :
  ∀ (i : ι) (hi : i ∈ s),
    ↑(Ideal.Quotient.mk (P i ^ e i)) y =
      ↑(Ideal.Quotient.mk (P ↑{ val := i, property := hi } ^ e ↑{ val := i, property := hi }))
        (x { val := i, property := hi })
⊢ ∃ y, ∀ (i : ι) (hi : i ∈ s), y - x { val := i, property := hi } ∈ P i ^ e i
Theorem: Submodule.nontrivial_span_singleton
File: Mathlib/LinearAlgebra/Span.lean

tactic: use 0, ⟨x, Submodule.mem_span_singleton_self x⟩
state_before: R : Type u_2
R₂ : Type ?u.114155
K : Type ?u.114158
M : Type u_1
M₂ : Type ?u.114164
V : Type ?u.114167
S : Type ?u.114170
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x : M
h : x ≠ 0
⊢ ∃ x_1 y, x_1 ≠ y

tactic: intro H
state_before: R : Type u_2
R₂ : Type ?u.114155
K : Type ?u.114158
M : Type u_1
M₂ : Type ?u.114164
V : Type ?u.114167
S : Type ?u.114170
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x : M
h : x ≠ 0
⊢ 0 ≠ { val := x, property := (_ : x ∈ span R {x}) }

tactic: rw [eq_comm, Submodule.mk_eq_zero] at H
state_before: R : Type u_2
R₂ : Type ?u.114155
K : Type ?u.114158
M : Type u_1
M₂ : Type ?u.114164
V : Type ?u.114167
S : Type ?u.114170
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x : M
h : x ≠ 0
H : 0 = { val := x, property := (_ : x ∈ span R {x}) }
⊢ False

tactic: exact h H
state_before: R : Type u_2
R₂ : Type ?u.114155
K : Type ?u.114158
M : Type u_1
M₂ : Type ?u.114164
V : Type ?u.114167
S : Type ?u.114170
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x✝ : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
x : M
h : x ≠ 0
H : x = 0
⊢ False
Theorem: AddLECancellable.lt_tsub_iff_left_of_le
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [add_comm]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hc : AddLECancellable c
h : c ≤ b
⊢ a < b - c ↔ c + a < b

tactic: exact hc.lt_tsub_iff_right_of_le h
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hc : AddLECancellable c
h : c ≤ b
⊢ a < b - c ↔ a + c < b
Theorem: Order.Ideal.isPrime_of_mem_or_compl_mem
File: Mathlib/Order/PrimeIdeal.lean

tactic: simp only [isPrime_iff_mem_or_mem, or_iff_not_imp_left]
state_before: P : Type u_1
inst✝¹ : BooleanAlgebra P
x : P
I : Ideal P
inst✝ : IsProper I
h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I
⊢ IsPrime I

tactic: intro x y hxy hxI
state_before: P : Type u_1
inst✝¹ : BooleanAlgebra P
x : P
I : Ideal P
inst✝ : IsProper I
h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I
⊢ ∀ {x y : P}, x ⊓ y ∈ I → ¬x ∈ I → y ∈ I

tactic: have hxcI : xᶜ ∈ I := h.resolve_left hxI
state_before: P : Type u_1
inst✝¹ : BooleanAlgebra P
x✝ : P
I : Ideal P
inst✝ : IsProper I
h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I
x y : P
hxy : x ⊓ y ∈ I
hxI : ¬x ∈ I
⊢ y ∈ I

tactic: have ass : x ⊓ y ⊔ y ⊓ xᶜ ∈ I := sup_mem hxy (I.lower inf_le_right hxcI)
state_before: P : Type u_1
inst✝¹ : BooleanAlgebra P
x✝ : P
I : Ideal P
inst✝ : IsProper I
h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I
x y : P
hxy : x ⊓ y ∈ I
hxI : ¬x ∈ I
hxcI : xᶜ ∈ I
⊢ y ∈ I

tactic: rwa [inf_comm, sup_inf_inf_compl] at ass
state_before: P : Type u_1
inst✝¹ : BooleanAlgebra P
x✝ : P
I : Ideal P
inst✝ : IsProper I
h : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I
x y : P
hxy : x ⊓ y ∈ I
hxI : ¬x ∈ I
hxcI : xᶜ ∈ I
ass : x ⊓ y ⊔ y ⊓ xᶜ ∈ I
⊢ y ∈ I
Theorem: exists_ne
File: Mathlib/Logic/Nontrivial.lean

tactic: letI := Classical.decEq α
state_before: α : Type u_1
β : Type ?u.349
inst✝ : Nontrivial α
x : α
⊢ ∃ y, y ≠ x

tactic: exact Decidable.exists_ne x
state_before: α : Type u_1
β : Type ?u.349
inst✝ : Nontrivial α
x : α
this : DecidableEq α := Classical.decEq α
⊢ ∃ y, y ≠ x
Theorem: BilinForm.toMatrix_apply
File: Mathlib/LinearAlgebra/Matrix/BilinearForm.lean

tactic: rw [BilinForm.toMatrix, LinearEquiv.trans_apply, BilinForm.toMatrix'_apply, congr_apply,
  b.equivFun_symm_stdBasis, b.equivFun_symm_stdBasis]
state_before: R : Type ?u.1078977
M : Type ?u.1078980
inst✝¹⁷ : Semiring R
inst✝¹⁶ : AddCommMonoid M
inst✝¹⁵ : Module R M
R₁ : Type ?u.1079016
M₁ : Type ?u.1079019
inst✝¹⁴ : Ring R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_1
M₂ : Type u_2
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type ?u.1079818
M₃ : Type ?u.1079821
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type ?u.1080409
K : Type ?u.1080412
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
n : Type u_3
o : Type ?u.1081629
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : DecidableEq n
b : Basis n R₂ M₂
B : BilinForm R₂ M₂
i j : n
⊢ ↑(toMatrix b) B i j = bilin B (↑b i) (↑b j)
Theorem: MeasureTheory.tendsto_measure_iUnion
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [measure_iUnion_eq_iSup (directed_of_sup hm)]
state_before: α : Type u_2
β : Type ?u.56609
γ : Type ?u.56612
δ : Type ?u.56615
ι : Type u_1
R : Type ?u.56621
R' : Type ?u.56624
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
s : ι → Set α
hm : Monotone s
⊢ Tendsto (↑↑μ ∘ s) atTop (𝓝 (↑↑μ (⋃ (n : ι), s n)))

tactic: exact tendsto_atTop_iSup fun n m hnm => measure_mono <| hm hnm
state_before: α : Type u_2
β : Type ?u.56609
γ : Type ?u.56612
δ : Type ?u.56615
ι : Type u_1
R : Type ?u.56621
R' : Type ?u.56624
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
s : ι → Set α
hm : Monotone s
⊢ Tendsto (↑↑μ ∘ s) atTop (𝓝 (⨆ (i : ι), ↑↑μ (s i)))
Theorem: Equiv.Perm.support_prod_le
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: induction' l with hd tl hl
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
l : List (Perm α)
⊢ support (List.prod l) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support l)

tactic: simp
state_before: case nil
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
⊢ support (List.prod []) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support [])

tactic: rw [List.prod_cons, List.map_cons, List.foldr_cons]
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : support (List.prod tl) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ support (List.prod (hd :: tl)) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support (hd :: tl))

tactic: refine' (support_mul_le hd tl.prod).trans _
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : support (List.prod tl) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ support (hd * List.prod tl) ≤ support hd ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)

tactic: exact sup_le_sup le_rfl hl
state_before: case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : support (List.prod tl) ≤ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
⊢ support hd ⊔ support (List.prod tl) ≤ support hd ⊔ List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
Theorem: Multiset.bind_zero
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp [bind, join, nsmul_zero]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.11661
δ : Type ?u.11664
a : α
s t : Multiset α
f g : α → Multiset β
⊢ (bind s fun x => 0) = 0
Theorem: Filter.prod_comm
File: Mathlib/Order/Filter/Prod.lean

tactic: rw [prod_comm', ← map_swap_eq_comap_swap]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.14817
δ : Type ?u.14820
ι : Sort ?u.14823
s : Set α
t : Set β
f : Filter α
g : Filter β
⊢ f ×ˢ g = map (fun p => (p.snd, p.fst)) (g ×ˢ f)

tactic: rfl
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.14817
δ : Type ?u.14820
ι : Sort ?u.14823
s : Set α
t : Set β
f : Filter α
g : Filter β
⊢ Prod.swap <$> (g ×ˢ f) = map (fun p => (p.snd, p.fst)) (g ×ˢ f)
Theorem: Set.Infinite.exists_subset_card_eq
File: Mathlib/Data/Set/Finite.lean

tactic: simp
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
hs : Set.Infinite s
n : ℕ
⊢ ↑(Finset.map (Embedding.subtype fun x => x ∈ s) (Finset.map (natEmbedding s hs) (Finset.range n))) ⊆ s ∧
    Finset.card (Finset.map (Embedding.subtype fun x => x ∈ s) (Finset.map (natEmbedding s hs) (Finset.range n))) = n
Theorem: String.Pos.zero_addChar_byteIdx
File: Std/Data/String/Lemmas.lean

tactic: simp only [addChar_byteIdx, byteIdx_zero, Nat.zero_add]
state_before: c : Char
⊢ (0 + c).byteIdx = csize c
Theorem: CategoryTheory.Idempotents.Karoubi.decompId_i_naturality
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

tactic: exact Hom.mk f.f (by simp)
state_before: C : Type ?u.50202
inst✝ : Category C
P Q : Karoubi C
f : P ⟶ Q
⊢ mk P.X (𝟙 P.X) ⟶ mk Q.X (𝟙 Q.X)

tactic: simp
state_before: C : Type ?u.50202
inst✝ : Category C
P Q : Karoubi C
f : P ⟶ Q
⊢ f.f = (mk P.X (𝟙 P.X)).p ≫ f.f ≫ (mk Q.X (𝟙 Q.X)).p

tactic: aesop_cat
state_before: C : Type u_1
inst✝ : Category C
P Q : Karoubi C
f : P ⟶ Q
⊢ f ≫ decompId_i Q = decompId_i P ≫ Hom.mk f.f
Theorem: Turing.ListBlank.nth_modifyNth
File: Mathlib/Computability/TuringMachine.lean

tactic: induction' n with n IH generalizing i L
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
n i : ℕ
L : ListBlank Γ
⊢ nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i

tactic: cases i <;> simp only [ListBlank.nth_zero, if_true, ListBlank.head_cons, ListBlank.modifyNth,
  ListBlank.nth_succ, if_false, ListBlank.tail_cons, Nat.zero_eq]
state_before: case zero
Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
i✝ : ℕ
L✝ : ListBlank Γ
i : ℕ
L : ListBlank Γ
⊢ nth (modifyNth f Nat.zero L) i = if i = Nat.zero then f (nth L i) else nth L i

tactic: cases i
state_before: case succ
Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
i✝ : ℕ
L✝ : ListBlank Γ
n : ℕ
IH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i
i : ℕ
L : ListBlank Γ
⊢ nth (modifyNth f (Nat.succ n) L) i = if i = Nat.succ n then f (nth L i) else nth L i

tactic: rw [if_neg (Nat.succ_ne_zero _).symm]
state_before: case succ.zero
Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
i : ℕ
L✝ : ListBlank Γ
n : ℕ
IH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i
L : ListBlank Γ
⊢ nth (modifyNth f (Nat.succ n) L) Nat.zero = if Nat.zero = Nat.succ n then f (nth L Nat.zero) else nth L Nat.zero

tactic: simp only [ListBlank.nth_zero, ListBlank.head_cons, ListBlank.modifyNth, Nat.zero_eq]
state_before: case succ.zero
Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
i : ℕ
L✝ : ListBlank Γ
n : ℕ
IH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i
L : ListBlank Γ
⊢ nth (modifyNth f (Nat.succ n) L) Nat.zero = nth L Nat.zero

tactic: simp only [IH, ListBlank.modifyNth, ListBlank.nth_succ, ListBlank.tail_cons, Nat.succ.injEq]
state_before: case succ.succ
Γ : Type u_1
inst✝ : Inhabited Γ
f : Γ → Γ
i : ℕ
L✝ : ListBlank Γ
n : ℕ
IH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i
L : ListBlank Γ
n✝ : ℕ
⊢ nth (modifyNth f (Nat.succ n) L) (Nat.succ n✝) =
    if Nat.succ n✝ = Nat.succ n then f (nth L (Nat.succ n✝)) else nth L (Nat.succ n✝)
Theorem: dvd_neg
File: Mathlib/Algebra/Ring/Divisibility.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.2595
inst✝¹ : Semigroup α
inst✝ : HasDistribNeg α
a b c : α
⊢ (∃ b_1, -b = a * ↑(Equiv.neg α).symm b_1) ↔ a ∣ b

tactic: rfl
state_before: α : Type u_1
β : Type ?u.2595
inst✝¹ : Semigroup α
inst✝ : HasDistribNeg α
a b c : α
⊢ (∃ b_1, b = a * b_1) ↔ a ∣ b
Theorem: Nat.preimage_Iio
File: Mathlib/Algebra/Order/Floor.lean

tactic: ext
state_before: F : Type ?u.75344
α : Type u_1
β : Type ?u.75350
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a : α
⊢ Nat.cast ⁻¹' Iio a = Iio ⌈a⌉₊

tactic: simp [lt_ceil]
state_before: case h
F : Type ?u.75344
α : Type u_1
β : Type ?u.75350
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a : α
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Iio a ↔ x✝ ∈ Iio ⌈a⌉₊
Theorem: Complex.sinh_two_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [two_mul, sinh_add]
state_before: x y : ℂ
⊢ sinh (2 * x) = 2 * sinh x * cosh x

tactic: ring
state_before: x y : ℂ
⊢ sinh x * cosh x + cosh x * sinh x = 2 * sinh x * cosh x
Theorem: Erased.out_mk
File: Mathlib/Data/Erased.lean

tactic: let h := (mk a).2
state_before: α : Sort u_1
a : α
⊢ out (mk a) = a

tactic: show Classical.choose h = a
state_before: α : Sort u_1
a : α
h : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd
⊢ out (mk a) = a

tactic: have := Classical.choose_spec h
state_before: α : Sort u_1
a : α
h : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd
⊢ Classical.choose h = a

tactic: exact cast (congr_fun this a).symm rfl
state_before: α : Sort u_1
a : α
h : ∃ a_1, (fun b => a_1 = b) = (mk a).fst := (mk a).snd
this : (fun b => Classical.choose h = b) = (mk a).fst
⊢ Classical.choose h = a
Theorem: PNat.pos_of_div_pos
File: Mathlib/Data/PNat/Basic.lean

tactic: apply pos_iff_ne_zero.2
state_before: n : ℕ+
a : ℕ
h : a ∣ ↑n
⊢ 0 < a

tactic: intro hzero
state_before: n : ℕ+
a : ℕ
h : a ∣ ↑n
⊢ a ≠ 0

tactic: rw [hzero] at h
state_before: n : ℕ+
a : ℕ
h : a ∣ ↑n
hzero : a = 0
⊢ False

tactic: exact PNat.ne_zero n (eq_zero_of_zero_dvd h)
state_before: n : ℕ+
a : ℕ
h : 0 ∣ ↑n
hzero : a = 0
⊢ False
Theorem: MeasureTheory.FiniteMeasure.smul_testAgainstNN_apply
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: simp only [testAgainstNN, toMeasure_smul, smul_eq_mul, ← ENNReal.smul_toNNReal, ENNReal.smul_def,
  lintegral_smul_measure]
state_before: Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type ?u.54872
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : TopologicalSpace Ω
c : ℝ≥0
μ : FiniteMeasure Ω
f : Ω →ᵇ ℝ≥0
⊢ testAgainstNN (c • μ) f = c • testAgainstNN μ f
Theorem: Nat.choose_eq_factorial_div_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [← choose_mul_factorial_mul_factorial hk, mul_assoc]
state_before: n k : ℕ
hk : k ≤ n
⊢ choose n k = n ! / (k ! * (n - k)!)

tactic: exact (mul_div_left _ (mul_pos (factorial_pos _) (factorial_pos _))).symm
state_before: n k : ℕ
hk : k ≤ n
⊢ choose n k = choose n k * (k ! * (n - k)!) / (k ! * (n - k)!)
Theorem: sInf_inv
File: Mathlib/Algebra/Order/Pointwise.lean

tactic: rw [← image_inv, sInf_image]
state_before: α : Type u_1
inst✝³ : CompleteLattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
s✝ t s : Set α
⊢ sInf s⁻¹ = (sSup s)⁻¹

tactic: exact ((OrderIso.inv α).map_sSup _).symm
state_before: α : Type u_1
inst✝³ : CompleteLattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
s✝ t s : Set α
⊢ (⨅ (a : α) (_ : a ∈ s), a⁻¹) = (sSup s)⁻¹
Theorem: MeasureTheory.Measure.InnerRegular.exists_subset_lt_add
File: Mathlib/MeasureTheory/Measure/Regular.lean

tactic: cases' eq_or_ne (μ U) 0 with h₀ h₀
state_before: α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε

tactic: refine' ⟨∅, empty_subset _, h0, _⟩
state_before: case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε

tactic: rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero]
state_before: case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ↑↑μ U < ↑↑μ ∅ + ε

tactic: rcases H hU _ (ENNReal.sub_lt_self hμU h₀ hε) with ⟨K, hKU, hKc, hrK⟩
state_before: case inr
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε

tactic: exact ⟨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hμU) hrK⟩
state_before: case inr.intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegular μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
K : Set α
hKU : K ⊆ U
hKc : p K
hrK : ↑↑μ U - ε < ↑↑μ K
⊢ ∃ K, K ⊆ U ∧ p K ∧ ↑↑μ U < ↑↑μ K + ε
Theorem: finRotate_of_lt
File: Mathlib/Logic/Equiv/Fin.lean

tactic: ext
state_before: m n k : ℕ
h : k < n
⊢ ↑(finRotate (n + 1)) { val := k, isLt := (_ : k < n + 1) } = { val := k + 1, isLt := (_ : Nat.succ k < Nat.succ n) }

tactic: dsimp [finRotate_succ]
state_before: case h
m n k : ℕ
h : k < n
⊢ ↑(↑(finRotate (n + 1)) { val := k, isLt := (_ : k < n + 1) }) =
    ↑{ val := k + 1, isLt := (_ : Nat.succ k < Nat.succ n) }

tactic: simp [finAddFlip_apply_mk_left h, add_comm]
state_before: case h
m n k : ℕ
h : k < n
⊢ ↑(↑finAddFlip { val := k, isLt := (_ : k < n + 1) }) = k + 1
Theorem: Module.endTensorEndAlgHom_apply
File: Mathlib/RingTheory/TensorProduct.lean

tactic: simp only [endTensorEndAlgHom, Algebra.TensorProduct.algHomOfLinearMapTensorProduct_apply,
  homTensorHomMap_apply]
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : Module R M
inst✝ : Module R N
f : End R M
g : End R N
⊢ ↑endTensorEndAlgHom (f ⊗ₜ[R] g) = map f g
Theorem: rank_finsupp_self'
File: Mathlib/LinearAlgebra/FreeModule/Rank.lean

tactic: simp
state_before: R : Type u
M : Type v
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
ι : Type u
⊢ Module.rank R (ι →₀ R) = (#ι)
Theorem: LinearOrderedField.inducedMap_one
File: Mathlib/Algebra/Order/CompleteField.lean

tactic: exact_mod_cast inducedMap_rat α β 1
state_before: F : Type ?u.19004
α : Type u_2
β : Type u_1
γ : Type ?u.19013
inst✝³ : LinearOrderedField α
inst✝² : ConditionallyCompleteLinearOrderedField β
inst✝¹ : ConditionallyCompleteLinearOrderedField γ
inst✝ : Archimedean α
⊢ inducedMap α β 1 = 1
Theorem: SimpleGraph.deleteEdges_deleteEdges
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext
state_before: ι : Sort ?u.155613
𝕜 : Type ?u.155616
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
s s' : Set (Sym2 V)
⊢ deleteEdges (deleteEdges G s) s' = deleteEdges G (s ∪ s')

tactic: simp [and_assoc, not_or]
state_before: case Adj.h.h.a
ι : Sort ?u.155613
𝕜 : Type ?u.155616
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
s s' : Set (Sym2 V)
x✝¹ x✝ : V
⊢ Adj (deleteEdges (deleteEdges G s) s') x✝¹ x✝ ↔ Adj (deleteEdges G (s ∪ s')) x✝¹ x✝
Theorem: Complex.continuous_exp
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: convert locally_lipschitz_exp zero_le_one le_rfl x y using 2
state_before: z y✝ x✝ : ℝ
x y : ℂ
⊢ dist y x < 1 → dist (exp y) (exp x) ≤ 2 * ‖exp x‖ * dist y x

tactic: congr
state_before: case h'.h.e'_4
z y✝ x✝ : ℝ
x y : ℂ
a✝ : ‖y - x‖ < 1
⊢ 2 * ‖exp x‖ * dist y x = (1 + 1) * ‖exp x‖ * ‖y - x‖

tactic: ring
state_before: case h'.h.e'_4.e_a.e_a
z y✝ x✝ : ℝ
x y : ℂ
a✝ : ‖y - x‖ < 1
⊢ 2 = 1 + 1
Theorem: Set.ordConnected_dual
File: Mathlib/Data/Set/Intervals/OrdConnected.lean

tactic: simpa only [ordConnected_def] using h.dual
state_before: α : Type u_1
β : Type ?u.3064
inst✝¹ : Preorder α
inst✝ : Preorder β
s✝ t s : Set α
h : OrdConnected (↑ofDual ⁻¹' s)
⊢ OrdConnected s
Theorem: ZNum.cast_lt
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← cast_to_int m, ← cast_to_int n, Int.cast_lt, lt_to_int]
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
m n : ZNum
⊢ ↑m < ↑n ↔ m < n
Theorem: DirectSum.coe_decompose_mul_of_right_mem_of_le
File: Mathlib/RingTheory/GradedAlgebra/Basic.lean

tactic: lift b to 𝒜 i using b_mem
state_before: ι : Type u_3
R : Type ?u.367118
A : Type u_1
σ : Type u_2
inst✝⁸ : Semiring A
inst✝⁷ : DecidableEq ι
inst✝⁶ : CanonicallyOrderedAddMonoid ι
inst✝⁵ : SetLike σ A
inst✝⁴ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝³ : GradedRing 𝒜
a b : A
n i : ι
inst✝² : Sub ι
inst✝¹ : OrderedSub ι
inst✝ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
b_mem : b ∈ 𝒜 i
h : i ≤ n
⊢ ↑(↑(↑(decompose 𝒜) (a * b)) n) = ↑(↑(↑(decompose 𝒜) a) (n - i)) * b

tactic: rwa [decompose_mul, decompose_coe, coe_mul_of_apply_of_le]
state_before: case intro
ι : Type u_3
R : Type ?u.367118
A : Type u_1
σ : Type u_2
inst✝⁸ : Semiring A
inst✝⁷ : DecidableEq ι
inst✝⁶ : CanonicallyOrderedAddMonoid ι
inst✝⁵ : SetLike σ A
inst✝⁴ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝³ : GradedRing 𝒜
a : A
n i : ι
inst✝² : Sub ι
inst✝¹ : OrderedSub ι
inst✝ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
h : i ≤ n
b : { x // x ∈ 𝒜 i }
⊢ ↑(↑(↑(decompose 𝒜) (a * ↑b)) n) = ↑(↑(↑(decompose 𝒜) a) (n - i)) * ↑b