tasksource/leandojo huggingface dataset:
Theorem: Tree.treesOfNumNodesEq_succ
File: Mathlib/Combinatorics/Catalan.lean

tactic: rw [treesOfNumNodesEq]
state_before: n : ℕ
⊢ treesOfNumNodesEq (n + 1) =
    Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)

tactic: ext
state_before: n : ℕ
⊢ (Finset.biUnion (attach (Nat.antidiagonal n)) fun ijh =>
      pairwiseNode (treesOfNumNodesEq (↑ijh).fst) (treesOfNumNodesEq (↑ijh).snd)) =
    Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)

tactic: simp
state_before: case a
n : ℕ
a✝ : Tree Unit
⊢ (a✝ ∈
      Finset.biUnion (attach (Nat.antidiagonal n)) fun ijh =>
        pairwiseNode (treesOfNumNodesEq (↑ijh).fst) (treesOfNumNodesEq (↑ijh).snd)) ↔
    a✝ ∈
      Finset.biUnion (Nat.antidiagonal n) fun ij => pairwiseNode (treesOfNumNodesEq ij.fst) (treesOfNumNodesEq ij.snd)
Theorem: EuclideanGeometry.Sphere.center_eq_iff_eq_of_mem
File: Mathlib/Geometry/Euclidean/Sphere/Basic.lean

tactic: refine' ⟨fun h => Sphere.ext _ _ h _, fun h => h ▸ rfl⟩
state_before: V : Type ?u.4387
P : Type u_1
inst✝ : MetricSpace P
s₁ s₂ : Sphere P
p : P
hs₁ : p ∈ s₁
hs₂ : p ∈ s₂
⊢ s₁.center = s₂.center ↔ s₁ = s₂

tactic: rw [mem_sphere] at hs₁ hs₂
state_before: V : Type ?u.4387
P : Type u_1
inst✝ : MetricSpace P
s₁ s₂ : Sphere P
p : P
hs₁ : p ∈ s₁
hs₂ : p ∈ s₂
h : s₁.center = s₂.center
⊢ s₁.radius = s₂.radius

tactic: rw [← hs₁, ← hs₂, h]
state_before: V : Type ?u.4387
P : Type u_1
inst✝ : MetricSpace P
s₁ s₂ : Sphere P
p : P
hs₁ : dist p s₁.center = s₁.radius
hs₂ : dist p s₂.center = s₂.radius
h : s₁.center = s₂.center
⊢ s₁.radius = s₂.radius
Theorem: NNRat.ext_num_den
File: Mathlib/Data/Rat/NNRat.lean

tactic: ext
state_before: p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ p = q

tactic: apply (Int.natAbs_inj_of_nonneg_of_nonneg _ _).1 hn
state_before: case a.num
p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ (↑p).num = (↑q).num

tactic: exact Rat.num_nonneg_iff_zero_le.2 p.2
state_before: p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ 0 ≤ (↑p).num

p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ 0 ≤ (↑q).num

tactic: exact Rat.num_nonneg_iff_zero_le.2 q.2
state_before: p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ 0 ≤ (↑q).num

tactic: exact hd
state_before: case a.den
p q : ℚ≥0
hn : num p = num q
hd : den p = den q
⊢ (↑p).den = (↑q).den
Theorem: Std.RBNode.All.balRight
File: Std/Data/RBMap/WF.lean

tactic: unfold balRight
state_before: α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r : RBNode α✝
hl : All p l
hv : p v
hr : All p r
⊢ All p (balRight l v r)

tactic: split <;> simp_all
state_before: α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r : RBNode α✝
hl : All p l
hv : p v
hr : All p r
⊢ All p
    (match r with
    | node red b y c => node red l v (node black b y c)
    | r =>
      match l with
      | node black a x b => balance1 (node red a x b) v r
      | node red a x (node black b y c) => node red (balance1 (setRed a) x b) y (node black c v r)
      | l => node red l v r)

tactic: split <;> simp_all [All.setRed]
state_before: case h_2
α✝ : Type u_1
p : α✝ → Prop
l : RBNode α✝
v : α✝
r l✝ : RBNode α✝
hl : All p l
hv : p v
hr : All p r
x✝ : ∀ (a : RBNode α✝) (x : α✝) (b : RBNode α✝), r = node red a x b → False
⊢ All p
    (match l with
    | node black a x b => balance1 (node red a x b) v r
    | node red a x (node black b y c) => node red (balance1 (setRed a) x b) y (node black c v r)
    | l => node red l v r)
Theorem: Convex.add_smul_mem_interior'
File: Mathlib/Analysis/Convex/Topology.lean

tactic: simpa only [add_sub_cancel'] using hs.add_smul_sub_mem_interior' hx hy ht
state_before: ι : Type ?u.124932
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
x y : E
hx : x ∈ closure s
hy : x + y ∈ interior s
t : 𝕜
ht : t ∈ Ioc 0 1
⊢ x + t • y ∈ interior s
Theorem: WithTop.image_coe_Ici
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: rw [← preimage_coe_Ici, image_preimage_eq_inter_range, range_coe, Ici_inter_Iio]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some '' Ici a = Ico ↑a ⊤
Theorem: Lagrange.eval_basis_not_at_node
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [mul_comm, basis_eq_prod_sub_inv_mul_nodal_div hi, eval_mul, eval_C, ←
  nodal_erase_eq_nodal_div hi, eval_nodal, eval_nodal, mul_assoc, ← mul_prod_erase _ _ hi, ←
  mul_assoc (x - v i)⁻¹, inv_mul_cancel (sub_ne_zero_of_ne hxi), one_mul]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
s : Finset ι
v : ι → F
i : ι
r : ι → F
x : F
inst✝ : DecidableEq ι
hi : i ∈ s
hxi : x ≠ v i
⊢ eval x (Lagrange.basis s v i) = eval x (nodal s v) * (nodalWeight s v i * (x - v i)⁻¹)
Theorem: congr_heq
File: Mathlib/Logic/Basic.lean

tactic: cases h₂
state_before: α β : Sort u_1
γ : Sort u_2
f : α → γ
g : β → γ
x : α
y : β
h₁ : HEq f g
h₂ : HEq x y
⊢ f x = g y

tactic: cases h₁
state_before: case refl
α : Sort u_1
γ : Sort u_2
f : α → γ
x : α
g : α → γ
h₁ : HEq f g
⊢ f x = g x

tactic: rfl
state_before: case refl.refl
α : Sort u_1
γ : Sort u_2
f : α → γ
x : α
⊢ f x = f x
Theorem: AList.lookup_insert
File: Mathlib/Data/List/AList.lean

tactic: simp only [lookup, insert, dlookup_kinsert]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
b : β a
s : AList β
⊢ lookup a (insert a b s) = some b
Theorem: Zsqrtd.coe_int_dvd_coe_int
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: rw [coe_int_dvd_iff]
state_before: d a b : ℤ
⊢ ↑a ∣ ↑b ↔ a ∣ b

tactic: constructor
state_before: d a b : ℤ
⊢ a ∣ (↑b).re ∧ a ∣ (↑b).im ↔ a ∣ b

tactic: rintro ⟨hre, -⟩
state_before: case mp
d a b : ℤ
⊢ a ∣ (↑b).re ∧ a ∣ (↑b).im → a ∣ b

tactic: rwa [coe_int_re] at hre
state_before: case mp.intro
d a b : ℤ
hre : a ∣ (↑b).re
⊢ a ∣ b

tactic: rw [coe_int_re, coe_int_im]
state_before: case mpr
d a b : ℤ
⊢ a ∣ b → a ∣ (↑b).re ∧ a ∣ (↑b).im

tactic: exact fun hc => ⟨hc, dvd_zero a⟩
state_before: case mpr
d a b : ℤ
⊢ a ∣ b → a ∣ b ∧ a ∣ 0
Theorem: Ordnode.raised_iff
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: constructor
state_before: α : Type ?u.243566
n m : ℕ
⊢ Raised n m ↔ n ≤ m ∧ m ≤ n + 1

tactic: rintro (rfl | rfl)
state_before: case mp
α : Type ?u.243566
n m : ℕ
⊢ Raised n m → n ≤ m ∧ m ≤ n + 1

case mpr
α : Type ?u.243566
n m : ℕ
⊢ n ≤ m ∧ m ≤ n + 1 → Raised n m

tactic: exact ⟨le_rfl, Nat.le_succ _⟩
state_before: case mp.inl
α : Type ?u.243566
m : ℕ
⊢ m ≤ m ∧ m ≤ m + 1

tactic: exact ⟨Nat.le_succ _, le_rfl⟩
state_before: case mp.inr
α : Type ?u.243566
n : ℕ
⊢ n ≤ n + 1 ∧ n + 1 ≤ n + 1

tactic: rintro ⟨h₁, h₂⟩
state_before: case mpr
α : Type ?u.243566
n m : ℕ
⊢ n ≤ m ∧ m ≤ n + 1 → Raised n m

tactic: rcases eq_or_lt_of_le h₁ with (rfl | h₁)
state_before: case mpr.intro
α : Type ?u.243566
n m : ℕ
h₁ : n ≤ m
h₂ : m ≤ n + 1
⊢ Raised n m

tactic: exact Or.inl rfl
state_before: case mpr.intro.inl
α : Type ?u.243566
n : ℕ
h₁ : n ≤ n
h₂ : n ≤ n + 1
⊢ Raised n n

tactic: exact Or.inr (le_antisymm h₂ h₁)
state_before: case mpr.intro.inr
α : Type ?u.243566
n m : ℕ
h₁✝ : n ≤ m
h₂ : m ≤ n + 1
h₁ : n < m
⊢ Raised n m
Theorem: ite_one_mul
File: Mathlib/Algebra/Group/Basic.lean

tactic: by_cases h:P <;> simp [h]
state_before: α : Type ?u.2448
β : Type ?u.2451
G : Type ?u.2454
M : Type u
inst✝¹ : MulOneClass M
P : Prop
inst✝ : Decidable P
a b : M
⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b
Theorem: MonoidHom.mrange_top_iff_surjective
File: Mathlib/GroupTheory/Submonoid/Operations.lean

tactic: rw [coe_mrange, coe_top]
state_before: M : Type u_2
N : Type u_1
P : Type ?u.118478
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type ?u.118499
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
F : Type u_3
mc : MonoidHomClass F M N
f : F
⊢ ↑(mrange f) = ↑⊤ ↔ Set.range ↑f = Set.univ
Theorem: Quaternion.mul_re
File: Mathlib/Algebra/Quaternion.lean

tactic: simp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]
state_before: S : Type ?u.416499
T : Type ?u.416502
R : Type u_1
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ a.re * b.re + -1 * a.imI * b.imI + -1 * a.imJ * b.imJ - -1 * -1 * a.imK * b.imK =
    a.re * b.re - a.imI * b.imI - a.imJ * b.imJ - a.imK * b.imK
Theorem: Class.classToCong_empty
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: ext
state_before: ⊢ classToCong ∅ = ∅

tactic: simp [classToCong]
state_before: case h
x✝ : Class
⊢ x✝ ∈ classToCong ∅ ↔ x✝ ∈ ∅
Theorem: Measurable.prod
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rw [MeasurableSpace.comap_le_iff_le_map, MeasurableSpace.map_comp]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.79726
δ' : Type ?u.79729
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
f : α → β × γ
hf₁ : Measurable fun a => (f a).fst
hf₂ : Measurable fun a => (f a).snd
⊢ MeasurableSpace.comap Prod.fst mβ ≤ MeasurableSpace.map f m

tactic: exact hf₁
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.79726
δ' : Type ?u.79729
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
f : α → β × γ
hf₁ : Measurable fun a => (f a).fst
hf₂ : Measurable fun a => (f a).snd
⊢ mβ ≤ MeasurableSpace.map (Prod.fst ∘ f) m

tactic: rw [MeasurableSpace.comap_le_iff_le_map, MeasurableSpace.map_comp]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.79726
δ' : Type ?u.79729
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
f : α → β × γ
hf₁ : Measurable fun a => (f a).fst
hf₂ : Measurable fun a => (f a).snd
⊢ MeasurableSpace.comap Prod.snd mγ ≤ MeasurableSpace.map f m

tactic: exact hf₂
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.79726
δ' : Type ?u.79729
ι : Sort uι
s t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
f : α → β × γ
hf₁ : Measurable fun a => (f a).fst
hf₂ : Measurable fun a => (f a).snd
⊢ mγ ≤ MeasurableSpace.map (Prod.snd ∘ f) m
Theorem: continuous_const_smul_iff
File: Mathlib/Topology/Algebra/ConstMulAction.lean

tactic: simp only [continuous_iff_continuousAt, continuousAt_const_smul_iff]
state_before: M : Type ?u.43779
α : Type u_2
β : Type u_1
G : Type u_3
inst✝⁴ : TopologicalSpace α
inst✝³ : Group G
inst✝² : MulAction G α
inst✝¹ : ContinuousConstSMul G α
inst✝ : TopologicalSpace β
f : β → α
b : β
s : Set β
c : G
⊢ (Continuous fun x => c • f x) ↔ Continuous f
Theorem: CategoryTheory.Adjunction.unit_rightAdjointUniq_hom
File: Mathlib/CategoryTheory/Adjunction/Opposites.lean

tactic: ext x
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G G' : D ⥤ C
adj1 : F ⊣ G
adj2 : F ⊣ G'
⊢ adj1.unit ≫ whiskerLeft F (rightAdjointUniq adj1 adj2).hom = adj2.unit

tactic: simp
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G G' : D ⥤ C
adj1 : F ⊣ G
adj2 : F ⊣ G'
x : C
⊢ (adj1.unit ≫ whiskerLeft F (rightAdjointUniq adj1 adj2).hom).app x = adj2.unit.app x
Theorem: Real.Angle.coe_nat_mul_eq_nsmul
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: simpa only [nsmul_eq_mul] using coeHom.map_nsmul x n
state_before: x : ℝ
n : ℕ
⊢ ↑(↑n * x) = n • ↑x
Theorem: Multiset.countp_cons
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [List.countp_cons]
state_before: α : Type u_1
β : Type ?u.295572
γ : Type ?u.295575
p : α → Prop
inst✝ : DecidablePred p
b : α
s : Multiset α
⊢ ∀ (a : List α), countp p (b ::ₘ Quot.mk Setoid.r a) = countp p (Quot.mk Setoid.r a) + if p b then 1 else 0
Theorem: CategoryTheory.MonoidalCategory.rightUnitor_conjugation
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← rightUnitor_naturality_assoc, Iso.hom_inv_id, Category.comp_id]
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
f : X ⟶ Y
⊢ f ⊗ 𝟙 (𝟙_ C) = (ρ_ X).hom ≫ f ≫ (ρ_ Y).inv
Theorem: DirectSum.ofPow
File: Mathlib/Algebra/DirectSum/Ring.lean

tactic: induction' n with n n_ih
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
⊢ ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)

tactic: exact of_eq_of_gradedMonoid_eq (pow_zero <| GradedMonoid.mk _ a).symm
state_before: case zero
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
⊢ ↑(of A i) a ^ Nat.zero = ↑(of A (Nat.zero • i)) (GradedMonoid.GMonoid.gnpow Nat.zero a)

tactic: rw [pow_succ, n_ih, of_mul_of a]
state_before: case succ
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
n_ih : ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
⊢ ↑(of A i) a ^ Nat.succ n = ↑(of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)

tactic: exact of_eq_of_gradedMonoid_eq (pow_succ (GradedMonoid.mk _ a) n).symm
state_before: case succ
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
i : ι
a : A i
n : ℕ
n_ih : ↑(of A i) a ^ n = ↑(of A (n • i)) (GradedMonoid.GMonoid.gnpow n a)
⊢ ↑(of A (i + n • i)) (GradedMonoid.GMul.mul a (GradedMonoid.GMonoid.gnpow n a)) =
    ↑(of A (Nat.succ n • i)) (GradedMonoid.GMonoid.gnpow (Nat.succ n) a)
Theorem: List.rtakeWhile_concat_pos
File: Mathlib/Data/List/Rdrop.lean

tactic: rw [rtakeWhile_concat, if_pos h]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
h : p x = true
⊢ rtakeWhile p (l ++ [x]) = rtakeWhile p l ++ [x]
Theorem: Equiv.Perm.viaFintypeEmbedding_apply_image
File: Mathlib/Logic/Equiv/Fintype.lean

tactic: rw [Equiv.Perm.viaFintypeEmbedding]
state_before: α : Type u_2
β : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq β
e : Perm α
f : α ↪ β
a : α
⊢ ↑(viaFintypeEmbedding e f) (↑f a) = ↑f (↑e a)

tactic: convert Equiv.Perm.extendDomain_apply_image e (Function.Embedding.toEquivRange f) a
state_before: α : Type u_2
β : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq β
e : Perm α
f : α ↪ β
a : α
⊢ ↑(extendDomain e (Function.Embedding.toEquivRange f)) (↑f a) = ↑f (↑e a)
Theorem: CategoryTheory.GrothendieckTopology.Subpresheaf.lift_ι
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

tactic: ext
state_before: C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
hf : ∀ (U : Cᵒᵖ) (x : F'.obj U), f.app U x ∈ obj G U
⊢ lift G f hf ≫ ι G = f

tactic: rfl
state_before: case w.h.h
C : Type u
inst✝ : Category C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
f : F' ⟶ F
hf : ∀ (U : Cᵒᵖ) (x : F'.obj U), f.app U x ∈ obj G U
x✝ : Cᵒᵖ
a✝ : F'.obj x✝
⊢ (lift G f hf ≫ ι G).app x✝ a✝ = f.app x✝ a✝
Theorem: Matrix.fromBlocks_toBlocks
File: Mathlib/Data/Matrix/Block.lean

tactic: ext i j
state_before: l : Type u_4
m : Type u_3
n : Type u_2
o : Type u_1
p : Type ?u.4504
q : Type ?u.4507
m' : o → Type ?u.4512
n' : o → Type ?u.4517
p' : o → Type ?u.4522
R : Type ?u.4525
S : Type ?u.4528
α : Type u_5
β : Type ?u.4534
M : Matrix (n ⊕ o) (l ⊕ m) α
⊢ fromBlocks (toBlocks₁₁ M) (toBlocks₁₂ M) (toBlocks₂₁ M) (toBlocks₂₂ M) = M

tactic: rcases i with ⟨⟩ <;> rcases j with ⟨⟩ <;> rfl
state_before: case a.h
l : Type u_4
m : Type u_3
n : Type u_2
o : Type u_1
p : Type ?u.4504
q : Type ?u.4507
m' : o → Type ?u.4512
n' : o → Type ?u.4517
p' : o → Type ?u.4522
R : Type ?u.4525
S : Type ?u.4528
α : Type u_5
β : Type ?u.4534
M : Matrix (n ⊕ o) (l ⊕ m) α
i : n ⊕ o
j : l ⊕ m
⊢ fromBlocks (toBlocks₁₁ M) (toBlocks₁₂ M) (toBlocks₂₁ M) (toBlocks₂₂ M) i j = M i j
Theorem: Finset.Nonempty.eq_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: rintro ⟨x, hx⟩
state_before: α : Type u_1
β : Type ?u.1716
γ : Type ?u.1719
inst✝¹ : Fintype α
s t : Finset α
inst✝ : Subsingleton α
⊢ Finset.Nonempty s → s = univ

tactic: refine' eq_univ_of_forall fun y => by rwa [Subsingleton.elim y x]
state_before: case intro
α : Type u_1
β : Type ?u.1716
γ : Type ?u.1719
inst✝¹ : Fintype α
s t : Finset α
inst✝ : Subsingleton α
x : α
hx : x ∈ s
⊢ s = univ

tactic: rwa [Subsingleton.elim y x]
state_before: α : Type u_1
β : Type ?u.1716
γ : Type ?u.1719
inst✝¹ : Fintype α
s t : Finset α
inst✝ : Subsingleton α
x : α
hx : x ∈ s
y : α
⊢ y ∈ s
Theorem: PiToModule.fromEnd_apply_single_one
File: Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean

tactic: rw [PiToModule.fromEnd_apply]
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
i : ι
⊢ ↑(↑(fromEnd R b) f) (Pi.single i 1) = ↑f (b i)

tactic: congr
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
i : ι
⊢ ↑f (↑(↑(Fintype.total R R) b) (Pi.single i 1)) = ↑f (b i)

tactic: convert Fintype.total_apply_single (S := R) R b i (1 : R)
state_before: case h.e_6.h
ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
i : ι
⊢ ↑(↑(Fintype.total R R) b) (Pi.single i 1) = b i

tactic: rw [one_smul]
state_before: case h.e'_3
ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
f : Module.End R M
i : ι
⊢ b i = 1 • b i
Theorem: CategoryTheory.Functor.pi'_eval
File: Mathlib/CategoryTheory/Pi/Basic.lean

tactic: apply Functor.ext
state_before: I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
⊢ pi' f ⋙ Pi.eval C i = f i

tactic: intro _ _ _
state_before: case h_map
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
⊢ autoParam
    (∀ (X Y : A) (f_1 : X ⟶ Y),
      (pi' f ⋙ Pi.eval C i).map f_1 =
        eqToHom (_ : ?F.obj X = ?G.obj X) ≫ (f i).map f_1 ≫ eqToHom (_ : (f i).obj Y = (pi' f ⋙ Pi.eval C i).obj Y))
    _auto✝

case h_obj
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
⊢ ∀ (X : A), (pi' f ⋙ Pi.eval C i).obj X = (f i).obj X

tactic: simp
state_before: case h_map
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
X✝ Y✝ : A
f✝ : X✝ ⟶ Y✝
⊢ (pi' f ⋙ Pi.eval C i).map f✝ =
    eqToHom (_ : ?F.obj X✝ = ?G.obj X✝) ≫ (f i).map f✝ ≫ eqToHom (_ : (f i).obj Y✝ = (pi' f ⋙ Pi.eval C i).obj Y✝)

tactic: intro _
state_before: case h_obj
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
⊢ ∀ (X : A), (pi' f ⋙ Pi.eval C i).obj X = (f i).obj X

tactic: rfl
state_before: case h_obj
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝² : (i : I) → Category (C i)
D : I → Type u₁
inst✝¹ : (i : I) → Category (D i)
A : Type u₁
inst✝ : Category A
f : (i : I) → A ⥤ C i
i : I
X✝ : A
⊢ (pi' f ⋙ Pi.eval C i).obj X✝ = (f i).obj X✝
Theorem: MeasureTheory.SimpleFunc.add_lintegral
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: rw [add_eq_map₂, map_lintegral]
state_before: α : Type u_1
β : Type ?u.857846
γ : Type ?u.857849
δ : Type ?u.857852
m : MeasurableSpace α
μ ν : Measure α
f g : α →ₛ ℝ≥0∞
⊢ lintegral (f + g) μ =
    ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}))

tactic: exact Finset.sum_congr rfl fun a _ => add_mul _ _ _
state_before: α : Type u_1
β : Type ?u.857846
γ : Type ?u.857849
δ : Type ?u.857852
m : MeasurableSpace α
μ ν : Measure α
f g : α →ₛ ℝ≥0∞
⊢ ∑ x in SimpleFunc.range (pair f g), (x.fst + x.snd) * ↑↑μ (↑(pair f g) ⁻¹' {x}) =
    ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}))

tactic: rw [Finset.sum_add_distrib]
state_before: α : Type u_1
β : Type ?u.857846
γ : Type ?u.857849
δ : Type ?u.857852
m : MeasurableSpace α
μ ν : Measure α
f g : α →ₛ ℝ≥0∞
⊢ ∑ x in SimpleFunc.range (pair f g), (x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) + x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x})) =
    ∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) +
      ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x})

tactic: rw [map_lintegral, map_lintegral]
state_before: α : Type u_1
β : Type ?u.857846
γ : Type ?u.857849
δ : Type ?u.857852
m : MeasurableSpace α
μ ν : Measure α
f g : α →ₛ ℝ≥0∞
⊢ ∑ x in SimpleFunc.range (pair f g), x.fst * ↑↑μ (↑(pair f g) ⁻¹' {x}) +
      ∑ x in SimpleFunc.range (pair f g), x.snd * ↑↑μ (↑(pair f g) ⁻¹' {x}) =
    lintegral (map Prod.fst (pair f g)) μ + lintegral (map Prod.snd (pair f g)) μ
Theorem: trans_trichotomous_left
File: Mathlib/Order/RelClasses.lean

tactic: intro h₁ h₂
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
⊢ ¬r b a → r b c → r a c

tactic: rcases trichotomous_of r a b with (h₃ | rfl | h₃)
state_before: α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
⊢ r a c

tactic: exacts [_root_.trans h₃ h₂, h₂, absurd h₃ h₁]
state_before: case inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
h₃ : r a b
⊢ r a c

case inr.inl
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a c : α
h₁ : ¬r a a
h₂ : r a c
⊢ r a c

case inr.inr
α : Type u
β : Type v
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsTrans α r
inst✝ : IsTrichotomous α r
a b c : α
h₁ : ¬r b a
h₂ : r b c
h₃ : r b a
⊢ r a c
Theorem: TensorProduct.smul_tmul_smul
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: simp_rw [smul_tmul, tmul_smul, mul_smul]
state_before: R : Type u_3
inst✝¹⁶ : CommSemiring R
R' : Type ?u.288226
inst✝¹⁵ : Monoid R'
R'' : Type ?u.288232
inst✝¹⁴ : Semiring R''
M : Type u_1
N : Type u_2
P : Type ?u.288244
Q : Type ?u.288247
S : Type ?u.288250
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : Module R M
inst✝⁷ : Module R N
inst✝⁶ : Module R P
inst✝⁵ : Module R Q
inst✝⁴ : Module R S
inst✝³ : DistribMulAction R' M
inst✝² : Module R'' M
inst✝¹ : SMulCommClass R R' M
inst✝ : SMulCommClass R R'' M
r s : R
m : M
n : N
⊢ (r • m) ⊗ₜ[R] (s • n) = (r * s) • m ⊗ₜ[R] n