tasksource/leandojo huggingface dataset:
Theorem: AddSubmonoid.mem_iSup_iff_exists_dfinsupp'
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [AddSubmonoid.mem_iSup_iff_exists_dfinsupp]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : AddCommMonoid γ
S : ι → AddSubmonoid γ
inst✝ : (i : ι) → (x : { x // x ∈ S i }) → Decidable (x ≠ 0)
x : γ
⊢ x ∈ iSup S ↔ ∃ f, (sum f fun i xi => ↑xi) = x

tactic: simp_rw [sumAddHom_apply]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : AddCommMonoid γ
S : ι → AddSubmonoid γ
inst✝ : (i : ι) → (x : { x // x ∈ S i }) → Decidable (x ≠ 0)
x : γ
⊢ (∃ f, ↑(sumAddHom fun i => AddSubmonoid.subtype (S i)) f = x) ↔ ∃ f, (sum f fun i xi => ↑xi) = x

tactic: rfl
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : AddCommMonoid γ
S : ι → AddSubmonoid γ
inst✝ : (i : ι) → (x : { x // x ∈ S i }) → Decidable (x ≠ 0)
x : γ
⊢ (∃ f, (sum f fun x => ↑(AddSubmonoid.subtype (S x))) = x) ↔ ∃ f, (sum f fun i xi => ↑xi) = x
Theorem: InnerProductSpace.ext_inner_left_basis
File: Mathlib/Analysis/InnerProductSpace/Dual.lean

tactic: apply (toDualMap 𝕜 E).map_eq_iff.mp
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
⊢ x = y

tactic: refine' (Function.Injective.eq_iff ContinuousLinearMap.coe_injective).mp (Basis.ext b _)
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
⊢ ↑(toDualMap 𝕜 E) x = ↑(toDualMap 𝕜 E) y

tactic: intro i
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
⊢ ∀ (i : ι), ↑↑(↑(toDualMap 𝕜 E) x) (↑b i) = ↑↑(↑(toDualMap 𝕜 E) y) (↑b i)

tactic: simp only [ContinuousLinearMap.coe_coe]
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
i : ι
⊢ ↑↑(↑(toDualMap 𝕜 E) x) (↑b i) = ↑↑(↑(toDualMap 𝕜 E) y) (↑b i)

tactic: rw [toDualMap_apply, toDualMap_apply]
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
i : ι
⊢ ↑(↑(toDualMap 𝕜 E) x) (↑b i) = ↑(↑(toDualMap 𝕜 E) y) (↑b i)

tactic: rw [← inner_conj_symm]
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
i : ι
⊢ inner x (↑b i) = inner y (↑b i)

tactic: conv_rhs => rw [← inner_conj_symm]
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
i : ι
⊢ ↑(starRingEnd 𝕜) (inner (↑b i) x) = inner y (↑b i)

tactic: exact congr_arg conj (h i)
state_before: 𝕜 : Type u_2
E : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
ι : Type u_1
x y : E
b : Basis ι 𝕜 E
h : ∀ (i : ι), inner (↑b i) x = inner (↑b i) y
i : ι
⊢ ↑(starRingEnd 𝕜) (inner (↑b i) x) = ↑(starRingEnd 𝕜) (inner (↑b i) y)
Theorem: range_two_mul
File: Mathlib/Algebra/Parity.lean

tactic: ext x
state_before: F : Type ?u.66752
α✝ : Type ?u.66755
β : Type ?u.66758
R : Type ?u.66761
inst✝² : Semiring α✝
inst✝¹ : Semiring β
m n : α✝
α : Type u_1
inst✝ : Semiring α
⊢ (Set.range fun x => 2 * x) = {a | Even a}

tactic: simp [eq_comm, two_mul, Even]
state_before: case h
F : Type ?u.66752
α✝ : Type ?u.66755
β : Type ?u.66758
R : Type ?u.66761
inst✝² : Semiring α✝
inst✝¹ : Semiring β
m n : α✝
α : Type u_1
inst✝ : Semiring α
x : α
⊢ (x ∈ Set.range fun x => 2 * x) ↔ x ∈ {a | Even a}
Theorem: contDiff_norm_sq
File: Mathlib/Analysis/InnerProductSpace/Calculus.lean

tactic: convert (reClm : 𝕜 →L[ℝ] ℝ).contDiff.comp ((contDiff_id (E := E)).inner 𝕜 (contDiff_id (E := E)))
state_before: 𝕜 : Type ?u.101013
E : Type u_1
F : Type ?u.101019
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type ?u.101148
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
⊢ ContDiff ℝ n fun x => ‖x‖ ^ 2

tactic: exact (inner_self_eq_norm_sq _).symm
state_before: case h.e'_10.h
𝕜 : Type ?u.101013
E : Type u_1
F : Type ?u.101019
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : InnerProductSpace 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
inst✝² : NormedSpace ℝ E
G : Type ?u.101148
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
f g : G → E
f' g' : G →L[ℝ] E
s : Set G
x : G
n : ℕ∞
x✝ : E
⊢ ‖x✝‖ ^ 2 = (↑reClm ∘ fun x => inner (id x) (id x)) x✝
Theorem: CategoryTheory.IsKernelPair.mono_of_isIso_fst
File: Mathlib/CategoryTheory/Limits/Shapes/KernelPair.lean

tactic: obtain ⟨l, h₁, h₂⟩ := Limits.PullbackCone.IsLimit.lift' h.isLimit (𝟙 _) (𝟙 _) (by simp [h.w])
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
⊢ Mono f

tactic: rw [IsPullback.cone_fst, ← IsIso.eq_comp_inv, Category.id_comp] at h₁
state_before: case mk.intro
C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l ≫ PullbackCone.fst (IsPullback.cone h) = 𝟙 X
h₂ : l ≫ PullbackCone.snd (IsPullback.cone h) = 𝟙 X
⊢ Mono f

tactic: rw [h₁, IsIso.inv_comp_eq, Category.comp_id] at h₂
state_before: case mk.intro
C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l = inv a
h₂ : l ≫ PullbackCone.snd (IsPullback.cone h) = 𝟙 X
⊢ Mono f

tactic: constructor
state_before: case mk.intro
C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l = inv a
h₂ : PullbackCone.snd (IsPullback.cone h) = a
⊢ Mono f

tactic: intro Z g₁ g₂ e
state_before: case mk.intro.right_cancellation
C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l = inv a
h₂ : PullbackCone.snd (IsPullback.cone h) = a
⊢ ∀ {Z : C} (g h : Z ⟶ X), g ≫ f = h ≫ f → g = h

tactic: obtain ⟨l', rfl, rfl⟩ := Limits.PullbackCone.IsLimit.lift' h.isLimit _ _ e
state_before: case mk.intro.right_cancellation
C : Type u
inst✝¹ : Category C
R X Y Z✝ : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l = inv a
h₂ : PullbackCone.snd (IsPullback.cone h) = a
Z : C
g₁ g₂ : Z ⟶ X
e : g₁ ≫ f = g₂ ≫ f
⊢ g₁ = g₂

tactic: rw [IsPullback.cone_fst, h₂]
state_before: case mk.intro.right_cancellation.mk.intro
C : Type u
inst✝¹ : Category C
R X Y Z✝ : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
l : X ⟶ (IsPullback.cone h).pt
h₁ : l = inv a
h₂ : PullbackCone.snd (IsPullback.cone h) = a
Z : C
l' : Z ⟶ (IsPullback.cone h).pt
e : (l' ≫ PullbackCone.fst (IsPullback.cone h)) ≫ f = (l' ≫ PullbackCone.snd (IsPullback.cone h)) ≫ f
⊢ l' ≫ PullbackCone.fst (IsPullback.cone h) = l' ≫ PullbackCone.snd (IsPullback.cone h)

tactic: simp [h.w]
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
h : IsKernelPair f a b
inst✝ : IsIso a
⊢ 𝟙 X ≫ f = 𝟙 X ≫ f
Theorem: charP_of_injective_algebraMap
File: Mathlib/Algebra/CharP/Algebra.lean

tactic: rw [← CharP.cast_eq_zero_iff R p x]
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring A
inst✝¹ : Algebra R A
h : Function.Injective ↑(algebraMap R A)
p : ℕ
inst✝ : CharP R p
x : ℕ
⊢ ↑x = 0 ↔ p ∣ x

tactic: change algebraMap ℕ A x = 0 ↔ algebraMap ℕ R x = 0
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring A
inst✝¹ : Algebra R A
h : Function.Injective ↑(algebraMap R A)
p : ℕ
inst✝ : CharP R p
x : ℕ
⊢ ↑x = 0 ↔ ↑x = 0

tactic: rw [IsScalarTower.algebraMap_apply ℕ R A x]
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring A
inst✝¹ : Algebra R A
h : Function.Injective ↑(algebraMap R A)
p : ℕ
inst✝ : CharP R p
x : ℕ
⊢ ↑(algebraMap ℕ A) x = 0 ↔ ↑(algebraMap ℕ R) x = 0

tactic: refine' Iff.trans _ h.eq_iff
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring A
inst✝¹ : Algebra R A
h : Function.Injective ↑(algebraMap R A)
p : ℕ
inst✝ : CharP R p
x : ℕ
⊢ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = 0 ↔ ↑(algebraMap ℕ R) x = 0

tactic: rw [RingHom.map_zero]
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : Semiring A
inst✝¹ : Algebra R A
h : Function.Injective ↑(algebraMap R A)
p : ℕ
inst✝ : CharP R p
x : ℕ
⊢ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = 0 ↔ ↑(algebraMap R A) (↑(algebraMap ℕ R) x) = ↑(algebraMap R A) 0
Theorem: Primrec.list_rec
File: Mathlib/Computability/Primrec.lean

tactic: suffices F a = (f a, List.recOn (f a) (g a) fun b l IH => h a (b, l, IH)) by rw [this]
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.250840
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → List β
g : α → σ
h : α → β × List β × σ → σ
hf : Primrec f
hg : Primrec g
hh : Primrec₂ h
F : α → List β × σ := fun a => List.foldr (fun b s => (b :: s.fst, h a (b, s))) ([], g a) (f a)
this : Primrec F
a : α
⊢ (F a).snd = List.recOn (f a) (g a) fun b l IH => h a (b, l, IH)

tactic: dsimp
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.250840
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → List β
g : α → σ
h : α → β × List β × σ → σ
hf : Primrec f
hg : Primrec g
hh : Primrec₂ h
F : α → List β × σ := fun a => List.foldr (fun b s => (b :: s.fst, h a (b, s))) ([], g a) (f a)
this : Primrec F
a : α
⊢ F a = (f a, List.recOn (f a) (g a) fun b l IH => h a (b, l, IH))

tactic: induction' f a with b l IH <;> simp [*]
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.250840
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → List β
g : α → σ
h : α → β × List β × σ → σ
hf : Primrec f
hg : Primrec g
hh : Primrec₂ h
F : α → List β × σ := fun a => List.foldr (fun b s => (b :: s.fst, h a (b, s))) ([], g a) (f a)
this : Primrec F
a : α
⊢ List.foldr (fun b s => (b :: s.fst, h a (b, s))) ([], g a) (f a) =
    (f a, List.rec (g a) (fun b l IH => h a (b, l, IH)) (f a))

tactic: rw [this]
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.250840
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → List β
g : α → σ
h : α → β × List β × σ → σ
hf : Primrec f
hg : Primrec g
hh : Primrec₂ h
F : α → List β × σ := fun a => List.foldr (fun b s => (b :: s.fst, h a (b, s))) ([], g a) (f a)
this✝ : Primrec F
a : α
this : F a = (f a, List.recOn (f a) (g a) fun b l IH => h a (b, l, IH))
⊢ (F a).snd = List.recOn (f a) (g a) fun b l IH => h a (b, l, IH)
Theorem: Pmf.toOuterMeasure_uniformOfFintype_apply
File: Mathlib/Probability/ProbabilityMassFunction/Uniform.lean

tactic: rw [uniformOfFintype, toOuterMeasure_uniformOfFinset_apply,Fintype.card_ofFinset]
state_before: α : Type u_1
β : Type ?u.18864
γ : Type ?u.18867
inst✝¹ : Fintype α
inst✝ : Nonempty α
s : Set α
⊢ ↑(toOuterMeasure (uniformOfFintype α)) s = ↑(Fintype.card ↑s) / ↑(Fintype.card α)

tactic: rfl
state_before: α : Type u_1
β : Type ?u.18864
γ : Type ?u.18867
inst✝¹ : Fintype α
inst✝ : Nonempty α
s : Set α
⊢ ↑(Finset.card (Finset.filter (fun x => x ∈ s) Finset.univ)) / ↑(Finset.card Finset.univ) =
    ↑(Finset.card (Finset.filter (fun x => x ∈ s) Finset.univ)) / ↑(Fintype.card α)
Theorem: Filter.exists_forall_mem_of_hasBasis_mem_blimsup'
File: Mathlib/Order/LiminfLimsup.lean

tactic: obtain ⟨f, hf⟩ := exists_forall_mem_of_hasBasis_mem_blimsup hl hx
state_before: α : Type u_3
β : Type u_1
γ : Type ?u.185252
ι : Type u_2
p✝ : ι → Prop
s : ι → Set α
l : Filter β
b : ι → Set β
hl : HasBasis l (fun x => True) b
u : β → Set α
p : β → Prop
x : α
hx : x ∈ blimsup u l p
⊢ ∃ f, ∀ (i : ι), x ∈ u (f i) ∧ p (f i) ∧ f i ∈ b i

tactic: exact ⟨fun i => f ⟨i, trivial⟩, fun i => hf ⟨i, trivial⟩⟩
state_before: case intro
α : Type u_3
β : Type u_1
γ : Type ?u.185252
ι : Type u_2
p✝ : ι → Prop
s : ι → Set α
l : Filter β
b : ι → Set β
hl : HasBasis l (fun x => True) b
u : β → Set α
p : β → Prop
x : α
hx : x ∈ blimsup u l p
f : ↑{i | True} → β
hf : ∀ (i : ↑{i | True}), x ∈ u (f i) ∧ p (f i) ∧ f i ∈ b ↑i
⊢ ∃ f, ∀ (i : ι), x ∈ u (f i) ∧ p (f i) ∧ f i ∈ b i
Theorem: Set.nonempty_of_union_eq_top_of_nonempty
File: Mathlib/Data/Set/Lattice.lean

tactic: obtain ⟨x, m, -⟩ := exists_set_mem_of_union_eq_top t s w H.some
state_before: α : Type u_2
β : Type ?u.58148
γ : Type ?u.58151
ι✝ : Sort ?u.58154
ι' : Sort ?u.58157
ι₂ : Sort ?u.58160
κ : ι✝ → Sort ?u.58165
κ₁ : ι✝ → Sort ?u.58170
κ₂ : ι✝ → Sort ?u.58175
κ' : ι' → Sort ?u.58180
ι : Type u_1
t : Set ι
s : ι → Set α
H : Nonempty α
w : (⋃ (i : ι) (_ : i ∈ t), s i) = ⊤
⊢ Set.Nonempty t

tactic: exact ⟨x, m⟩
state_before: case intro.intro
α : Type u_2
β : Type ?u.58148
γ : Type ?u.58151
ι✝ : Sort ?u.58154
ι' : Sort ?u.58157
ι₂ : Sort ?u.58160
κ : ι✝ → Sort ?u.58165
κ₁ : ι✝ → Sort ?u.58170
κ₂ : ι✝ → Sort ?u.58175
κ' : ι' → Sort ?u.58180
ι : Type u_1
t : Set ι
s : ι → Set α
H : Nonempty α
w : (⋃ (i : ι) (_ : i ∈ t), s i) = ⊤
x : ι
m : x ∈ t
⊢ Set.Nonempty t
Theorem: toMatrix_rotation
File: Mathlib/Analysis/Complex/Isometry.lean

tactic: simp [pow_two, ← normSq_apply]
state_before: a : { x // x ∈ circle }
⊢ (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0

tactic: ext (i j)
state_before: a : { x // x ∈ circle }
⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) ↑(↑rotation a).toLinearEquiv =
    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0))

tactic: simp [LinearMap.toMatrix_apply]
state_before: case a.h
a : { x // x ∈ circle }
i j : Fin 2
⊢ ↑(LinearMap.toMatrix basisOneI basisOneI) (↑(↑rotation a).toLinearEquiv) i j =
    ↑(Matrix.planeConformalMatrix (↑a).re (↑a).im (_ : (↑a).re ^ 2 + (↑a).im ^ 2 ≠ 0)) i j

tactic: fin_cases i <;> fin_cases j <;> simp
state_before: case a.h
a : { x // x ∈ circle }
i j : Fin 2
⊢ Matrix.vecCons ((↑a).re * (Matrix.vecCons 1 ![I] j).re - (↑a).im * (Matrix.vecCons 1 ![I] j).im)
      ![(↑a).re * (Matrix.vecCons 1 ![I] j).im + (↑a).im * (Matrix.vecCons 1 ![I] j).re] i =
    Matrix.vecCons (Matrix.vecCons (↑a).re ![-(↑a).im] j) (fun i => Matrix.vecCons (↑a).im ![(↑a).re] j) i
Theorem: Nat.min_eq_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.min_comm a b]
state_before: a b : Nat
h : b ≤ a
⊢ min a b = b

tactic: exact Nat.min_eq_left h
state_before: a b : Nat
h : b ≤ a
⊢ min b a = b
Theorem: Nat.psub_add
File: Mathlib/Data/Nat/PSub.lean

tactic: induction k
state_before: m n k : ℕ
⊢ psub m (n + k) = do
    let __do_lift ← psub m n
    psub __do_lift k

tactic: simp [Option.bind_eq_bind, Option.bind_some]
state_before: case zero
m n : ℕ
⊢ psub m (n + zero) = do
    let __do_lift ← psub m n
    psub __do_lift zero

case succ
m n n✝ : ℕ
n_ih✝ :
  psub m (n + n✝) = do
    let __do_lift ← psub m n
    psub __do_lift n✝
⊢ psub m (n + succ n✝) = do
    let __do_lift ← psub m n
    psub __do_lift (succ n✝)

tactic: simp [*, Nat.add_succ]
state_before: case succ
m n n✝ : ℕ
n_ih✝ :
  psub m (n + n✝) = do
    let __do_lift ← psub m n
    psub __do_lift n✝
⊢ psub m (n + succ n✝) = do
    let __do_lift ← psub m n
    psub __do_lift (succ n✝)
Theorem: Associates.le_of_mul_le_mul_left
File: Mathlib/Algebra/Associated.lean

tactic: rwa [← mul_assoc]
state_before: α : Type u_1
β : Type ?u.333972
γ : Type ?u.333975
δ : Type ?u.333978
inst✝ : CancelCommMonoidWithZero α
a b c : Associates α
ha : a ≠ 0
d : Associates α
hd : a * c = a * b * d
⊢ a * c = a * (b * d)
Theorem: BoundedContinuousFunction.dist_lt_of_nonempty_compact
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

tactic: have c : Continuous fun x => dist (f x) (g x) := by continuity
state_before: F : Type ?u.276668
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
w : ∀ (x : α), dist (↑f x) (↑g x) < C
⊢ dist f g < C

tactic: obtain ⟨x, -, le⟩ :=
  IsCompact.exists_isMaxOn isCompact_univ Set.univ_nonempty (Continuous.continuousOn c)
state_before: F : Type ?u.276668
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
w : ∀ (x : α), dist (↑f x) (↑g x) < C
c : Continuous fun x => dist (↑f x) (↑g x)
⊢ dist f g < C

tactic: exact lt_of_le_of_lt (dist_le_iff_of_nonempty.mpr fun y => le trivial) (w x)
state_before: case intro.intro
F : Type ?u.276668
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : PseudoMetricSpace γ
f g : α →ᵇ β
x✝ : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
w : ∀ (x : α), dist (↑f x) (↑g x) < C
c : Continuous fun x => dist (↑f x) (↑g x)
x : α
le : IsMaxOn (fun x => dist (↑f x) (↑g x)) univ x
⊢ dist f g < C

tactic: continuity
state_before: F : Type ?u.276668
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : PseudoMetricSpace β
inst✝² : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
w : ∀ (x : α), dist (↑f x) (↑g x) < C
⊢ Continuous fun x => dist (↑f x) (↑g x)
Theorem: Finset.disjoint_of_erase_right
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← erase_insert ha, disjoint_erase_comm, disjoint_insert_left]
state_before: α : Type u_1
β : Type ?u.255969
γ : Type ?u.255972
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
ha : ¬a ∈ s
hst : _root_.Disjoint s (erase t a)
⊢ _root_.Disjoint s t

tactic: exact ⟨not_mem_erase _ _, hst⟩
state_before: α : Type u_1
β : Type ?u.255969
γ : Type ?u.255972
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
ha : ¬a ∈ s
hst : _root_.Disjoint s (erase t a)
⊢ ¬a ∈ erase t a ∧ _root_.Disjoint s (erase t a)
Theorem: closedEmbedding_of_continuous_injective_closed
File: Mathlib/Topology/Maps.lean

tactic: refine closedEmbedding_of_embedding_closed ⟨⟨?_⟩, h₂⟩ h₃
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.280474
δ : Type ?u.280477
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
⊢ ClosedEmbedding f

tactic: refine h₁.le_induced.antisymm fun s hs => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.280474
δ : Type ?u.280477
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
⊢ inst✝² = induced f inst✝¹

tactic: refine ⟨(f '' sᶜ)ᶜ, (h₃ _ hs.isClosed_compl).isOpen_compl, ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.280474
δ : Type ?u.280477
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set α
hs : IsOpen s
⊢ IsOpen s

tactic: rw [preimage_compl, preimage_image_eq _ h₂, compl_compl]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.280474
δ : Type ?u.280477
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set α
hs : IsOpen s
⊢ f ⁻¹' (f '' sᶜ)ᶜ = s
Theorem: Metric.preimage_smul_sphere
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

tactic: rw [preimage_smul, smul_sphere]
state_before: M : Type u
G : Type v
X : Type w
inst✝³ : PseudoMetricSpace X
inst✝² : Group G
inst✝¹ : MulAction G X
inst✝ : IsometricSMul G X
c : G
x : X
r : ℝ
⊢ (fun x x_1 => x • x_1) c ⁻¹' sphere x r = sphere (c⁻¹ • x) r
Theorem: zero_dvd_iff
File: Mathlib/Algebra/GroupWithZero/Divisibility.lean

tactic: rw [h]
state_before: α : Type u_1
inst✝ : SemigroupWithZero α
a : α
h : a = 0
⊢ 0 ∣ a

tactic: exact ⟨0, by simp⟩
state_before: α : Type u_1
inst✝ : SemigroupWithZero α
a : α
h : a = 0
⊢ 0 ∣ 0

tactic: simp
state_before: α : Type u_1
inst✝ : SemigroupWithZero α
a : α
h : a = 0
⊢ 0 = 0 * 0
Theorem: finprod_mem_eq_prod_of_inter_mulSupport_eq
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: intro x hxf
state_before: α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
⊢ ∀ {x : α}, f x ≠ 1 → (x ∈ s ↔ x ∈ t)

tactic: rw [← mem_mulSupport] at hxf
state_before: α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : f x ≠ 1
⊢ x ∈ s ↔ x ∈ t

tactic: refine ⟨fun hx => ?_, fun hx => ?_⟩
state_before: α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
⊢ x ∈ s ↔ x ∈ t

tactic: refine ((mem_inter_iff x t (mulSupport f)).mp ?_).1
state_before: case refine_1
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ s
⊢ x ∈ t

tactic: rw [← Set.ext_iff.mp h x, mem_inter_iff]
state_before: case refine_1
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ s
⊢ x ∈ ↑t ∩ mulSupport f

tactic: exact ⟨hx, hxf⟩
state_before: case refine_1
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ s
⊢ x ∈ s ∧ x ∈ mulSupport f

tactic: refine ((mem_inter_iff x s (mulSupport f)).mp ?_).1
state_before: case refine_2
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ t
⊢ x ∈ s

tactic: rw [Set.ext_iff.mp h x, mem_inter_iff]
state_before: case refine_2
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ t
⊢ x ∈ s ∩ mulSupport f

tactic: exact ⟨hx, hxf⟩
state_before: case refine_2
α : Type u_1
β : Type ?u.192527
ι : Type ?u.192530
G : Type ?u.192533
M : Type u_2
N : Type ?u.192539
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
t : Finset α
h : s ∩ mulSupport f = ↑t ∩ mulSupport f
x : α
hxf : x ∈ mulSupport f
hx : x ∈ t
⊢ x ∈ ↑t ∧ x ∈ mulSupport f
Theorem: ContDiffBump.integral_normed_smul
File: Mathlib/Analysis/Calculus/BumpFunctionInner.lean

tactic: simp_rw [integral_smul_const, f.integral_normed (μ := μ), one_smul]
state_before: E : Type u_2
X : Type u_1
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : NormedAddCommGroup X
inst✝⁷ : NormedSpace ℝ X
inst✝⁶ : HasContDiffBump E
c : E
f : ContDiffBump c
x : E
n : ℕ∞
inst✝⁵ : MeasurableSpace E
μ : MeasureTheory.Measure E
inst✝⁴ : BorelSpace E
inst✝³ : FiniteDimensional ℝ E
inst✝² : IsLocallyFiniteMeasure μ
inst✝¹ : Measure.IsOpenPosMeasure μ
inst✝ : CompleteSpace X
z : X
⊢ (∫ (x : E), ContDiffBump.normed f μ x • z ∂μ) = z