tasksource/leandojo huggingface dataset:
Theorem: List.finRange_succ_eq_map
File: Mathlib/Data/List/FinRange.lean

tactic: apply map_injective_iff.mpr Fin.val_injective
state_before: α : Type u
n : ℕ
⊢ finRange (Nat.succ n) = 0 :: map Fin.succ (finRange n)

tactic: rw [map_cons, map_coe_finRange, range_succ_eq_map, Fin.val_zero, ← map_coe_finRange, map_map,
  map_map]
state_before: case a
α : Type u
n : ℕ
⊢ map Fin.val (finRange (Nat.succ n)) = map Fin.val (0 :: map Fin.succ (finRange n))

tactic: simp only [Function.comp, Fin.val_succ]
state_before: case a
α : Type u
n : ℕ
⊢ 0 :: map (Nat.succ ∘ Fin.val) (finRange n) = 0 :: map (Fin.val ∘ Fin.succ) (finRange n)
Theorem: Matrix.TransvectionStruct.inv_mul
File: Mathlib/LinearAlgebra/Matrix/Transvection.lean

tactic: rcases t with ⟨_, _, t_hij⟩
state_before: n : Type u_1
p : Type ?u.32998
R : Type u₂
𝕜 : Type ?u.33003
inst✝⁴ : Field 𝕜
inst✝³ : DecidableEq n
inst✝² : DecidableEq p
inst✝¹ : CommRing R
i j : n
inst✝ : Fintype n
t : TransvectionStruct n R
⊢ toMatrix (TransvectionStruct.inv t) ⬝ toMatrix t = 1

tactic: simp [toMatrix, transvection_mul_transvection_same, t_hij]
state_before: case mk
n : Type u_1
p : Type ?u.32998
R : Type u₂
𝕜 : Type ?u.33003
inst✝⁴ : Field 𝕜
inst✝³ : DecidableEq n
inst✝² : DecidableEq p
inst✝¹ : CommRing R
i j : n
inst✝ : Fintype n
i✝ j✝ : n
t_hij : i✝ ≠ j✝
c✝ : R
⊢ toMatrix (TransvectionStruct.inv { i := i✝, j := j✝, hij := t_hij, c := c✝ }) ⬝
      toMatrix { i := i✝, j := j✝, hij := t_hij, c := c✝ } =
    1
Theorem: Primrec.nat_lt
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: α : Type ?u.137547
β : Type ?u.137550
γ : Type ?u.137553
δ : Type ?u.137556
σ : Type ?u.137559
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
p : ℕ × ℕ
⊢ ¬p.snd ≤ p.fst ↔ (fun x x_1 => x < x_1) p.fst p.snd
Theorem: Finset.prod_sub_ordered
File: Mathlib/Algebra/BigOperators/Ring.lean

tactic: simp only [sub_eq_add_neg]
state_before: α : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
b : β
f✝ g✝ : α → β
inst✝² : CommSemiring β
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrder ι
s : Finset ι
f g : ι → R
⊢ ∏ i in s, (f i - g i) =
    ∏ i in s, f i -
      ∑ i in s, (g i * ∏ j in filter (fun x => x < i) s, (f j - g j)) * ∏ j in filter (fun j => i < j) s, f j

tactic: convert prod_add_ordered s f fun i => -g i
state_before: α : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
b : β
f✝ g✝ : α → β
inst✝² : CommSemiring β
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrder ι
s : Finset ι
f g : ι → R
⊢ ∏ x in s, (f x + -g x) =
    ∏ i in s, f i +
      -∑ x in s, (g x * ∏ x in filter (fun x_1 => x_1 < x) s, (f x + -g x)) * ∏ i in filter (fun j => x < j) s, f i

tactic: simp
state_before: case h.e'_3.h.e'_6
α : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
b : β
f✝ g✝ : α → β
inst✝² : CommSemiring β
ι : Type u_1
R : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrder ι
s : Finset ι
f g : ι → R
⊢ -∑ x in s, (g x * ∏ x in filter (fun x_1 => x_1 < x) s, (f x + -g x)) * ∏ i in filter (fun j => x < j) s, f i =
    ∑ i in s, (-g i * ∏ j in filter (fun x => x < i) s, (f j + -g j)) * ∏ j in filter (fun j => i < j) s, f j
Theorem: Group.covariant_iff_contravariant
File: Mathlib/Algebra/CovariantAndContravariant.lean

tactic: refine ⟨fun h a b c bc ↦ ?_, fun h a b c bc ↦ ?_⟩
state_before: M : Type ?u.747
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝¹ : CovariantClass M N μ r
inst✝ : Group N
⊢ Covariant N N (fun x x_1 => x * x_1) r ↔ Contravariant N N (fun x x_1 => x * x_1) r

tactic: rw [← inv_mul_cancel_left a b, ← inv_mul_cancel_left a c]
state_before: case refine_1
M : Type ?u.747
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝¹ : CovariantClass M N μ r
inst✝ : Group N
h : Covariant N N (fun x x_1 => x * x_1) r
a b c : N
bc : r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)
⊢ r b c

tactic: exact h a⁻¹ bc
state_before: case refine_1
M : Type ?u.747
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝¹ : CovariantClass M N μ r
inst✝ : Group N
h : Covariant N N (fun x x_1 => x * x_1) r
a b c : N
bc : r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)
⊢ r (a⁻¹ * (a * b)) (a⁻¹ * (a * c))

tactic: rw [← inv_mul_cancel_left a b, ← inv_mul_cancel_left a c] at bc
state_before: case refine_2
M : Type ?u.747
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝¹ : CovariantClass M N μ r
inst✝ : Group N
h : Contravariant N N (fun x x_1 => x * x_1) r
a b c : N
bc : r b c
⊢ r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)

tactic: exact h a⁻¹ bc
state_before: case refine_2
M : Type ?u.747
N : Type u_1
μ : M → N → N
r : N → N → Prop
inst✝¹ : CovariantClass M N μ r
inst✝ : Group N
h : Contravariant N N (fun x x_1 => x * x_1) r
a b c : N
bc : r (a⁻¹ * (a * b)) (a⁻¹ * (a * c))
⊢ r ((fun x x_1 => x * x_1) a b) ((fun x x_1 => x * x_1) a c)
Theorem: CategoryTheory.Limits.IsColimit.uniq_cocone_morphism
File: Mathlib/CategoryTheory/Limits/IsLimit.lean

tactic: intro g
state_before: J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
C : Type u₃
inst✝ : Category C
F : J ⥤ C
s t : Cocone F
h : IsColimit t
f f' : t ⟶ s
⊢ ∀ {g : t ⟶ s}, g = descCoconeMorphism h s

tactic: aesop_cat_nonterminal
state_before: J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
C : Type u₃
inst✝ : Category C
F : J ⥤ C
s t : Cocone F
h : IsColimit t
f f' g : t ⟶ s
⊢ g = descCoconeMorphism h s

tactic: exact h.uniq _ _ g.w
state_before: case w
J : Type u₁
inst : Category J
K : Type u₂
inst_1 : Category K
C : Type u₃
inst_2 : Category C
F : J ⥤ C
s t : Cocone F
h : IsColimit t
f f' g : t ⟶ s
⊢ g.Hom = desc h s
Theorem: Ordinal.nfpFamily_fp
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: unfold nfpFamily
state_before: ι : Type u
f : ι → Ordinal → Ordinal
i : ι
H : IsNormal (f i)
a : Ordinal
⊢ f i (nfpFamily f a) = nfpFamily f a

tactic: rw [@IsNormal.sup.{u, v, v} _ H _ _ ⟨[]⟩]
state_before: ι : Type u
f : ι → Ordinal → Ordinal
i : ι
H : IsNormal (f i)
a : Ordinal
⊢ f i (sup (List.foldr f a)) = sup (List.foldr f a)

tactic: apply le_antisymm <;> refine' Ordinal.sup_le fun l => _
state_before: ι : Type u
f : ι → Ordinal → Ordinal
i : ι
H : IsNormal (f i)
a : Ordinal
⊢ sup (f i ∘ List.foldr f a) = sup (List.foldr f a)

tactic: exact le_sup _ (i::l)
state_before: case a
ι : Type u
f : ι → Ordinal → Ordinal
i : ι
H : IsNormal (f i)
a : Ordinal
l : List ι
⊢ (f i ∘ List.foldr f a) l ≤ sup (List.foldr f a)

tactic: exact (H.self_le _).trans (le_sup _ _)
state_before: case a
ι : Type u
f : ι → Ordinal → Ordinal
i : ι
H : IsNormal (f i)
a : Ordinal
l : List ι
⊢ List.foldr f a l ≤ sup (f i ∘ List.foldr f a)
Theorem: PFunctor.M.ext'
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: cases x
state_before: F : PFunctor
x y : M F
H : ∀ (i : ℕ), MIntl.approx x i = MIntl.approx y i
⊢ x = y

tactic: cases y
state_before: case mk
F : PFunctor
y : M F
approx✝ : (n : ℕ) → CofixA F n
consistent✝ : AllAgree approx✝
H : ∀ (i : ℕ), MIntl.approx { approx := approx✝, consistent := consistent✝ } i = MIntl.approx y i
⊢ { approx := approx✝, consistent := consistent✝ } = y

tactic: congr with n
state_before: case mk.mk
F : PFunctor
approx✝¹ : (n : ℕ) → CofixA F n
consistent✝¹ : AllAgree approx✝¹
approx✝ : (n : ℕ) → CofixA F n
consistent✝ : AllAgree approx✝
H :
  ∀ (i : ℕ),
    MIntl.approx { approx := approx✝¹, consistent := consistent✝¹ } i =
      MIntl.approx { approx := approx✝, consistent := consistent✝ } i
⊢ { approx := approx✝¹, consistent := consistent✝¹ } = { approx := approx✝, consistent := consistent✝ }

tactic: apply H
state_before: case mk.mk.e_approx.h
F : PFunctor
approx✝¹ : (n : ℕ) → CofixA F n
consistent✝¹ : AllAgree approx✝¹
approx✝ : (n : ℕ) → CofixA F n
consistent✝ : AllAgree approx✝
H :
  ∀ (i : ℕ),
    MIntl.approx { approx := approx✝¹, consistent := consistent✝¹ } i =
      MIntl.approx { approx := approx✝, consistent := consistent✝ } i
n : ℕ
⊢ approx✝¹ n = approx✝ n
Theorem: PGame.lf_of_le_of_lf
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [← PGame.not_le] at h₂⊢
state_before: x y z : PGame
h₁ : x ≤ y
h₂ : y ⧏ z
⊢ x ⧏ z

tactic: exact fun h₃ => h₂ (h₃.trans h₁)
state_before: x y z : PGame
h₁ : x ≤ y
h₂ : ¬z ≤ y
⊢ ¬z ≤ x
Theorem: Polynomial.rootMultiplicity_eq_zero_iff
File: Mathlib/Data/Polynomial/Div.lean

tactic: simp only [rootMultiplicity_eq_multiplicity, dite_eq_left_iff, PartENat.get_eq_iff_eq_coe,
  Nat.cast_zero, multiplicity.multiplicity_eq_zero, dvd_iff_isRoot, not_imp_not]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
p✝ q p : R[X]
x : R
⊢ rootMultiplicity x p = 0 ↔ IsRoot p x → p = 0
Theorem: nndist_eq_zero
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp only [← NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero]
state_before: α : Type u
β : Type v
X : Type ?u.551874
ι : Type ?u.551877
inst✝¹ : PseudoMetricSpace α
γ : Type w
inst✝ : MetricSpace γ
x y : γ
⊢ nndist x y = 0 ↔ x = y
Theorem: ProjectiveSpectrum.isClosed_zeroLocus
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: rw [isClosed_iff_zeroLocus]
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s : Set A
⊢ IsClosed (zeroLocus 𝒜 s)

tactic: exact ⟨s, rfl⟩
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s : Set A
⊢ ∃ s_1, zeroLocus 𝒜 s = zeroLocus 𝒜 s_1
Theorem: CategoryTheory.MonoidalClosed.pre_comm_ihom_map
File: Mathlib/CategoryTheory/Closed/Monoidal.lean

tactic: simp
state_before: C : Type u
inst✝⁵ : Category C
inst✝⁴ : MonoidalCategory C
A B X✝ X' Y✝ Y' Z✝ : C
inst✝³ : Closed A
inst✝² : Closed B
W X Y Z : C
inst✝¹ : Closed W
inst✝ : Closed X
f : W ⟶ X
g : Y ⟶ Z
⊢ (pre f).app Y ≫ (ihom W).map g = (ihom X).map g ≫ (pre f).app Z
Theorem: ZNum.cmp_to_int
File: Mathlib/Data/Num/Lemmas.lean

tactic: have := PosNum.cmp_to_nat a b
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.casesOn (cmp (pos a) (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))

tactic: revert this
state_before: α : Type ?u.968134
a b : PosNum
this : Ordering.casesOn (PosNum.cmp a b) (↑a < ↑b) (a = b) (↑b < ↑a)
⊢ Ordering.casesOn (cmp (pos a) (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))

tactic: dsimp [cmp]
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.casesOn (PosNum.cmp a b) (↑a < ↑b) (a = b) (↑b < ↑a) →
    Ordering.casesOn (cmp (pos a) (pos b)) (↑(pos a) < ↑(pos b)) (pos a = pos b) (↑(pos b) < ↑(pos a))

tactic: cases PosNum.cmp a b <;> dsimp <;> [simp; exact congr_arg pos; simp [GT.gt]]
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.rec (↑a < ↑b) (a = b) (↑b < ↑a) (PosNum.cmp a b) →
    Ordering.rec (↑a < ↑b) (pos a = pos b) (↑b < ↑a) (PosNum.cmp a b)

tactic: have := PosNum.cmp_to_nat b a
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.casesOn (cmp (neg a) (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))

tactic: revert this
state_before: α : Type ?u.968134
a b : PosNum
this : Ordering.casesOn (PosNum.cmp b a) (↑b < ↑a) (b = a) (↑a < ↑b)
⊢ Ordering.casesOn (cmp (neg a) (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))

tactic: dsimp [cmp]
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.casesOn (PosNum.cmp b a) (↑b < ↑a) (b = a) (↑a < ↑b) →
    Ordering.casesOn (cmp (neg a) (neg b)) (↑(neg a) < ↑(neg b)) (neg a = neg b) (↑(neg b) < ↑(neg a))

tactic: cases PosNum.cmp b a <;> dsimp <;> [simp; simp (config := { contextual := true }); simp [GT.gt]]
state_before: α : Type ?u.968134
a b : PosNum
⊢ Ordering.rec (↑b < ↑a) (b = a) (↑a < ↑b) (PosNum.cmp b a) →
    Ordering.rec (-↑a < -↑b) (neg a = neg b) (-↑b < -↑a) (PosNum.cmp b a)
Theorem: Cauchy.ultrafilter_of
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: haveI := h.1
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
l : Filter α
h : Cauchy l
⊢ Cauchy ↑(Ultrafilter.of l)

tactic: have := Ultrafilter.of_le l
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
l : Filter α
h : Cauchy l
this : NeBot l
⊢ Cauchy ↑(Ultrafilter.of l)

tactic: exact ⟨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2⟩
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
l : Filter α
h : Cauchy l
this✝ : NeBot l
this : ↑(Ultrafilter.of l) ≤ l
⊢ Cauchy ↑(Ultrafilter.of l)
Theorem: Finset.map_subtype_embedding_Ici
File: Mathlib/Order/LocallyFinite.lean

tactic: rw [subtype_Ici_eq]
state_before: α : Type u_1
β : Type ?u.223222
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Ici a) = Ici ↑a

tactic: exact Finset.subtype_map_of_mem fun x hx => hp (mem_Ici.1 hx) a.prop
state_before: α : Type u_1
β : Type ?u.223222
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrderTop α
a : Subtype p
hp : ∀ ⦃a x : α⦄, a ≤ x → p a → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ici ↑a)) = Ici ↑a
Theorem: Primrec₂.ofNat_iff
File: Mathlib/Computability/Primrec.lean

tactic: simp
state_before: α✝ : Type ?u.68744
β✝ : Type ?u.68747
σ✝ : Type ?u.68750
inst✝⁵ : Primcodable α✝
inst✝⁴ : Primcodable β✝
inst✝³ : Primcodable σ✝
α : Type u_1
β : Type u_2
σ : Type u_3
inst✝² : Denumerable α
inst✝¹ : Denumerable β
inst✝ : Primcodable σ
f : α → β → σ
⊢ (Primrec fun n => f (ofNat (α × β) n).fst (ofNat (α × β) n).snd) ↔
    Primrec (Nat.unpaired fun m n => f (ofNat α m) (ofNat β n))
Theorem: sq_eq_one_iff
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [← (Commute.one_right a).sq_eq_sq_iff_eq_or_eq_neg, one_pow]
state_before: R : Type u_1
S : Type ?u.125015
M : Type ?u.125018
inst✝¹ : Ring R
a b : R
inst✝ : NoZeroDivisors R
⊢ a ^ 2 = 1 ↔ a = 1 ∨ a = -1
Theorem: intervalIntegral.integral_comp_div
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simpa only [inv_inv] using integral_comp_mul_right f (inv_ne_zero hc)
state_before: ι : Type ?u.14843380
𝕜 : Type ?u.14843383
E : Type u_1
F : Type ?u.14843389
A : Type ?u.14843392
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d : ℝ
f : ℝ → E
hc : c ≠ 0
⊢ (∫ (x : ℝ) in a..b, f (x / c)) = c • ∫ (x : ℝ) in a / c..b / c, f x
Theorem: AddMonoidAlgebra.sup_support_pow_le
File: Mathlib/Algebra/MonoidAlgebra/Degree.lean

tactic: rw [← List.prod_replicate, ← List.sum_replicate]
state_before: R : Type u_3
A : Type u_2
T : Type ?u.47893
B : Type u_1
ι : Type ?u.47899
inst✝¹¹ : SemilatticeSup B
inst✝¹⁰ : OrderBot B
inst✝⁹ : SemilatticeInf T
inst✝⁸ : OrderTop T
inst✝⁷ : Semiring R
inst✝⁶ : AddMonoid A
inst✝⁵ : AddMonoid B
inst✝⁴ : CovariantClass B B (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝³ : CovariantClass B B (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝² : AddMonoid T
inst✝¹ : CovariantClass T T (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass T T (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
degb : A → B
degt : A → T
degb0 : degb 0 ≤ 0
degbm : ∀ (a b : A), degb (a + b) ≤ degb a + degb b
n : ℕ
f : AddMonoidAlgebra R A
⊢ Finset.sup (f ^ n).support degb ≤ n • Finset.sup f.support degb

tactic: refine' (sup_support_list_prod_le degb0 degbm _).trans_eq _
state_before: R : Type u_3
A : Type u_2
T : Type ?u.47893
B : Type u_1
ι : Type ?u.47899
inst✝¹¹ : SemilatticeSup B
inst✝¹⁰ : OrderBot B
inst✝⁹ : SemilatticeInf T
inst✝⁸ : OrderTop T
inst✝⁷ : Semiring R
inst✝⁶ : AddMonoid A
inst✝⁵ : AddMonoid B
inst✝⁴ : CovariantClass B B (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝³ : CovariantClass B B (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝² : AddMonoid T
inst✝¹ : CovariantClass T T (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass T T (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
degb : A → B
degt : A → T
degb0 : degb 0 ≤ 0
degbm : ∀ (a b : A), degb (a + b) ≤ degb a + degb b
n : ℕ
f : AddMonoidAlgebra R A
⊢ Finset.sup (List.prod (List.replicate n f)).support degb ≤ List.sum (List.replicate n (Finset.sup f.support degb))

tactic: rw [List.map_replicate]
state_before: R : Type u_3
A : Type u_2
T : Type ?u.47893
B : Type u_1
ι : Type ?u.47899
inst✝¹¹ : SemilatticeSup B
inst✝¹⁰ : OrderBot B
inst✝⁹ : SemilatticeInf T
inst✝⁸ : OrderTop T
inst✝⁷ : Semiring R
inst✝⁶ : AddMonoid A
inst✝⁵ : AddMonoid B
inst✝⁴ : CovariantClass B B (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝³ : CovariantClass B B (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝² : AddMonoid T
inst✝¹ : CovariantClass T T (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass T T (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
degb : A → B
degt : A → T
degb0 : degb 0 ≤ 0
degbm : ∀ (a b : A), degb (a + b) ≤ degb a + degb b
n : ℕ
f : AddMonoidAlgebra R A
⊢ List.sum (List.map (fun f => Finset.sup f.support degb) (List.replicate n f)) =
    List.sum (List.replicate n (Finset.sup f.support degb))
Theorem: CategoryTheory.Limits.Types.FilteredColimit.rel_eq_eqvGen_quot_rel
File: Mathlib/CategoryTheory/Limits/Types.lean

tactic: ext ⟨j, x⟩ ⟨j', y⟩
state_before: J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ TypeMax
inst✝ : IsFilteredOrEmpty J
⊢ FilteredColimit.Rel F = EqvGen (Quot.Rel F)

tactic: constructor
state_before: case h.mk.h.mk.a
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ TypeMax
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y } ↔
    EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y }

tactic: apply eqvGen_quot_rel_of_rel
state_before: case h.mk.h.mk.a.mp
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ TypeMax
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y } →
    EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y }

tactic: rw [← (FilteredColimit.rel_equiv F).eqvGen_iff]
state_before: case h.mk.h.mk.a.mpr
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ TypeMax
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y } →
    FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y }

tactic: exact EqvGen.mono (rel_of_quot_rel F)
state_before: case h.mk.h.mk.a.mpr
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ TypeMax
inst✝ : IsFilteredOrEmpty J
j : J
x : F.obj j
j' : J
y : F.obj j'
⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y } →
    EqvGen (FilteredColimit.Rel F) { fst := j, snd := x } { fst := j', snd := y }
Theorem: List.getLastD_cons
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
a b : α
l : List α
⊢ getLastD (b :: l) a = getLastD l b
Theorem: SimpleGraph.Walk.dart_fst_mem_support_of_mem_darts
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp only [support_cons, darts_cons, List.mem_cons] at hd ⊢
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h : Adj G u v✝
p' : Walk G v✝ v
d : Dart G
hd : d ∈ darts (cons h p')
⊢ d.fst ∈ support (cons h p')

tactic: rcases hd with (rfl | hd)
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h : Adj G u v✝
p' : Walk G v✝ v
d : Dart G
hd : d = { toProd := (u, v✝), is_adj := h } ∨ d ∈ darts p'
⊢ d.fst = u ∨ d.fst ∈ support p'

tactic: exact Or.inl rfl
state_before: case inl
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h : Adj G u v✝
p' : Walk G v✝ v
⊢ { toProd := (u, v✝), is_adj := h }.toProd.fst = u ∨ { toProd := (u, v✝), is_adj := h }.toProd.fst ∈ support p'

tactic: exact Or.inr (dart_fst_mem_support_of_mem_darts _ hd)
state_before: case inr
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v v✝ : V
h : Adj G u v✝
p' : Walk G v✝ v
d : Dart G
hd : d ∈ darts p'
⊢ d.fst = u ∨ d.fst ∈ support p'
Theorem: Set.disjoint_toFinset
File: Mathlib/Data/Fintype/Basic.lean

tactic: simp only [← disjoint_coe, coe_toFinset]
state_before: α : Type u_1
β : Type ?u.86017
γ : Type ?u.86020
s t : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑t
⊢ Disjoint (toFinset s) (toFinset t) ↔ Disjoint s t
Theorem: Nat.divisors_subset_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: apply Finset.subset_iff.2
state_before: n m : ℕ
hzero : n ≠ 0
h : m ∣ n
hdiff : m ≠ n
⊢ divisors m ⊆ properDivisors n

tactic: intro x hx
state_before: n m : ℕ
hzero : n ≠ 0
h : m ∣ n
hdiff : m ≠ n
⊢ ∀ ⦃x : ℕ⦄, x ∈ divisors m → x ∈ properDivisors n

tactic: exact
  Nat.mem_properDivisors.2
    ⟨(Nat.mem_divisors.1 hx).1.trans h,
      lt_of_le_of_lt (divisor_le hx)
        (lt_of_le_of_ne (divisor_le (Nat.mem_divisors.2 ⟨h, hzero⟩)) hdiff)⟩
state_before: n m : ℕ
hzero : n ≠ 0
h : m ∣ n
hdiff : m ≠ n
x : ℕ
hx : x ∈ divisors m
⊢ x ∈ properDivisors n
Theorem: Finset.prod_filter_of_ne
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: classical
  rw [not_imp_comm, mem_filter]
  exact fun h₁ h₂ => ⟨h₁, by simpa using hp _ h₁ h₂⟩
state_before: ι : Type ?u.334765
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ (x : α), x ∈ s → f x ≠ 1 → p x
x : α
⊢ x ∈ s → ¬x ∈ filter p s → f x = 1

tactic: rw [not_imp_comm, mem_filter]
state_before: ι : Type ?u.334765
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ (x : α), x ∈ s → f x ≠ 1 → p x
x : α
⊢ x ∈ s → ¬x ∈ filter p s → f x = 1

tactic: exact fun h₁ h₂ => ⟨h₁, by simpa using hp _ h₁ h₂⟩
state_before: ι : Type ?u.334765
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ (x : α), x ∈ s → f x ≠ 1 → p x
x : α
⊢ x ∈ s → ¬f x = 1 → x ∈ s ∧ p x

tactic: simpa using hp _ h₁ h₂
state_before: ι : Type ?u.334765
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommMonoid β
p : α → Prop
inst✝ : DecidablePred p
hp : ∀ (x : α), x ∈ s → f x ≠ 1 → p x
x : α
h₁ : x ∈ s
h₂ : ¬f x = 1
⊢ p x
Theorem: basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

tactic: rw [basis_toMatrix_mul_linearMap_toMatrix, linearMap_toMatrix_mul_basis_toMatrix]
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_5
R : Type u_4
M : Type u_7
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type ?u.410998
M₂ : Type ?u.411001
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_6
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Fintype κ
inst✝³ : Fintype κ'
inst✝² : Fintype ι
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
⊢ Basis.toMatrix c ↑c' ⬝ ↑(toMatrix b' c') f ⬝ Basis.toMatrix b' ↑b = ↑(toMatrix b c) f
Theorem: Set.Finite.isClosed
File: Mathlib/Topology/Separation.lean

tactic: rw [← biUnion_of_singleton s]
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
s : Set α
hs : Set.Finite s
⊢ IsClosed s

tactic: exact isClosed_biUnion hs fun i _ => isClosed_singleton
state_before: α : Type u
β : Type v
inst✝¹ : TopologicalSpace α
inst✝ : T1Space α
s : Set α
hs : Set.Finite s
⊢ IsClosed (⋃ (x : α) (_ : x ∈ s), {x})
Theorem: Polynomial.support_monomial'
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rw [← ofFinsupp_single, support]
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
⊢ support (↑(monomial n) a) ⊆ {n}

tactic: exact Finsupp.support_single_subset
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
⊢ (match { toFinsupp := Finsupp.single n a } with
    | { toFinsupp := p } => p.support) ⊆
    {n}