tasksource/leandojo huggingface dataset:
Theorem: BoxIntegral.IntegrationParams.exists_memBaseSet_le_iUnion_eq
File: Mathlib/Analysis/BoxIntegral/Partition/Filter.lean

tactic: rcases π₀.exists_tagged_le_isHenstock_isSubordinate_iUnion_eq r with ⟨π, hle, hH, hr, hd, hU⟩
state_before: ι : Type u_1
inst✝ : Fintype ι
I J : Box ι
c c₁ c₂ : ℝ≥0
r✝ r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π π₁ π₂ : TaggedPrepartition I
l✝ l₁ l₂ l : IntegrationParams
π₀ : Prepartition I
hc₁ : Prepartition.distortion π₀ ≤ c
hc₂ : Prepartition.distortion (Prepartition.compl π₀) ≤ c
r : (ι → ℝ) → ↑(Set.Ioi 0)
⊢ ∃ π, MemBaseSet l I c r π ∧ π.toPrepartition ≤ π₀ ∧ TaggedPrepartition.iUnion π = Prepartition.iUnion π₀

tactic: refine' ⟨π, ⟨hr, fun _ => hH, fun _ => hd.trans_le hc₁, fun _ => ⟨π₀.compl, _, hc₂⟩⟩, ⟨hle, hU⟩⟩
state_before: case intro.intro.intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
I J : Box ι
c c₁ c₂ : ℝ≥0
r✝ r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π✝ π₁ π₂ : TaggedPrepartition I
l✝ l₁ l₂ l : IntegrationParams
π₀ : Prepartition I
hc₁ : Prepartition.distortion π₀ ≤ c
hc₂ : Prepartition.distortion (Prepartition.compl π₀) ≤ c
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : TaggedPrepartition I
hle : π.toPrepartition ≤ π₀
hH : IsHenstock π
hr : IsSubordinate π r
hd : distortion π = Prepartition.distortion π₀
hU : TaggedPrepartition.iUnion π = Prepartition.iUnion π₀
⊢ ∃ π, MemBaseSet l I c r π ∧ π.toPrepartition ≤ π₀ ∧ TaggedPrepartition.iUnion π = Prepartition.iUnion π₀

tactic: exact Prepartition.compl_congr hU ▸ π.toPrepartition.iUnion_compl
state_before: case intro.intro.intro.intro.intro
ι : Type u_1
inst✝ : Fintype ι
I J : Box ι
c c₁ c₂ : ℝ≥0
r✝ r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π✝ π₁ π₂ : TaggedPrepartition I
l✝ l₁ l₂ l : IntegrationParams
π₀ : Prepartition I
hc₁ : Prepartition.distortion π₀ ≤ c
hc₂ : Prepartition.distortion (Prepartition.compl π₀) ≤ c
r : (ι → ℝ) → ↑(Set.Ioi 0)
π : TaggedPrepartition I
hle : π.toPrepartition ≤ π₀
hH : IsHenstock π
hr : IsSubordinate π r
hd : distortion π = Prepartition.distortion π₀
hU : TaggedPrepartition.iUnion π = Prepartition.iUnion π₀
x✝ : l.bDistortion = true
⊢ Prepartition.iUnion (Prepartition.compl π₀) = ↑I \ TaggedPrepartition.iUnion π
Theorem: ProbabilityTheory.cond_apply
File: Mathlib/Probability/ConditionalProbability.lean

tactic: rw [cond, Measure.smul_apply, Measure.restrict_apply' hms, Set.inter_comm, smul_eq_mul]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
s t✝ : Set Ω
hms : MeasurableSet s
t : Set Ω
⊢ ↑↑(μ[|s]) t = (↑↑μ s)⁻¹ * ↑↑μ (s ∩ t)
Theorem: AlgebraicGeometry.PresheafedSpace.stalkMap.id
File: Mathlib/AlgebraicGeometry/Stalks.lean

tactic: dsimp [stalkMap]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x : ↑↑X
⊢ stalkMap (𝟙 X) x = 𝟙 (stalk X x)

tactic: simp only [stalkPushforward.id]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x : ↑↑X
⊢ (stalkFunctor C ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x)).map (𝟙 X).c ≫ stalkPushforward C (𝟙 ↑X) X.presheaf x =
    𝟙 (stalk X x)

tactic: erw [← map_comp]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x : ↑↑X
⊢ (stalkFunctor C ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x)).map (𝟙 X).c ≫
      (stalkFunctor C x).map (Pushforward.id X.presheaf).hom =
    𝟙 (stalk X x)

tactic: convert (stalkFunctor C x).map_id X.presheaf
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x : ↑↑X
⊢ (stalkFunctor C ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x)).map ((𝟙 X).c ≫ (Pushforward.id X.presheaf).hom) =
    𝟙 (stalk X x)

tactic: refine NatTrans.ext _ _ <| funext fun x => ?_
state_before: case h.e'_2.h.h.e'_8
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x : ↑↑X
e_1✝ :
  (stalk X ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x) ⟶ stalk X x) =
    ((stalkFunctor C x).obj X.presheaf ⟶ (stalkFunctor C x).obj X.presheaf)
⊢ (𝟙 X).c ≫ (Pushforward.id X.presheaf).hom = 𝟙 X.presheaf

tactic: simp only [id_c, id_comp, Pushforward.id_hom_app, op_obj, eqToHom_refl, map_id]
state_before: case h.e'_2.h.h.e'_8
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x✝ : ↑↑X
e_1✝ :
  (stalk X ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x✝) ⟶ stalk X x✝) =
    ((stalkFunctor C x✝).obj X.presheaf ⟶ (stalkFunctor C x✝).obj X.presheaf)
x : (Opens ↑↑X)ᵒᵖ
⊢ ((𝟙 X).c ≫ (Pushforward.id X.presheaf).hom).app x = (𝟙 X.presheaf).app x

tactic: rfl
state_before: case h.e'_2.h.h.e'_8
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X : PresheafedSpace C
x✝ : ↑↑X
e_1✝ :
  (stalk X ((CategoryTheory.forget TopCat).map (𝟙 ↑X) x✝) ⟶ stalk X x✝) =
    ((stalkFunctor C x✝).obj X.presheaf ⟶ (stalkFunctor C x✝).obj X.presheaf)
x : (Opens ↑↑X)ᵒᵖ
⊢ 𝟙 (X.presheaf.obj ((Opens.map (𝟙 ↑X)).obj x.unop).op) = (𝟙 X.presheaf).app x
Theorem: Submodule.prod_eq_top_iff
File: Mathlib/LinearAlgebra/Prod.lean

tactic: simp only [eq_top_iff, le_prod_iff, ← (gc_map_comap _).le_iff_le, map_top, range_fst, range_snd]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.390033
M₆ : Type ?u.390036
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
p : Submodule R M
q : Submodule R M₂
p₁ : Submodule R M
p₂ : Submodule R M₂
⊢ prod p₁ p₂ = ⊤ ↔ p₁ = ⊤ ∧ p₂ = ⊤
Theorem: Complex.abs_exp_sub_one_sub_id_le
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sub_eq_add_neg, sum_range_succ_comm, add_assoc]
state_before: x : ℂ
hx : ↑abs x ≤ 1
⊢ ↑abs (exp x - 1 - x) = ↑abs (exp x - ∑ m in range 2, x ^ m / ↑(Nat.factorial m))

tactic: decide
state_before: x : ℂ
hx : ↑abs x ≤ 1
⊢ 0 < 2

tactic: gcongr
state_before: x : ℂ
hx : ↑abs x ≤ 1
⊢ ↑abs x ^ 2 * (↑(Nat.succ 2) * (↑(Nat.factorial 2) * ↑2)⁻¹) ≤ ↑abs x ^ 2 * 1

tactic: norm_num
state_before: case h
x : ℂ
hx : ↑abs x ≤ 1
⊢ ↑(Nat.succ 2) * (↑(Nat.factorial 2) * ↑2)⁻¹ ≤ 1

tactic: rw [mul_one]
state_before: x : ℂ
hx : ↑abs x ≤ 1
⊢ ↑abs x ^ 2 * 1 = ↑abs x ^ 2
Theorem: SimpleGraph.Preconnected.set_univ_walk_nonempty
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [← Set.nonempty_iff_univ_nonempty]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
hconn : Preconnected G
u v : V
⊢ Set.Nonempty Set.univ

tactic: exact hconn u v
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
hconn : Preconnected G
u v : V
⊢ Nonempty (Walk G u v)
Theorem: String.Iterator.ValidFor.prev
File: Std/Data/String/Lemmas.lean

tactic: cases h.out'
state_before: c : Char
l r : List Char
it : Iterator
h : ValidFor (c :: l) r it
⊢ ValidFor l (c :: r) (Iterator.prev it)

tactic: have := prev_of_valid l.reverse c r
state_before: case refl
c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
⊢ ValidFor l (c :: r)
    (Iterator.prev { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } })

tactic: simp at this
state_before: case refl
c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
this :
  String.prev { data := List.reverse l ++ c :: r } { byteIdx := utf8Len (List.reverse l) + csize c } =
    { byteIdx := utf8Len (List.reverse l) }
⊢ ValidFor l (c :: r)
    (Iterator.prev { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } })

tactic: simp [Iterator.prev, this]
state_before: case refl
c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
this : String.prev { data := List.reverse l ++ c :: r } { byteIdx := utf8Len l + csize c } = { byteIdx := utf8Len l }
⊢ ValidFor l (c :: r)
    (Iterator.prev { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } })

tactic: exact .of_eq _ (by simp [List.reverseAux_eq]) (by simp)
state_before: case refl
c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
this : String.prev { data := List.reverse l ++ c :: r } { byteIdx := utf8Len l + csize c } = { byteIdx := utf8Len l }
⊢ ValidFor l (c :: r) { s := { data := List.reverse l ++ c :: r }, i := { byteIdx := utf8Len l } }

tactic: simp [List.reverseAux_eq]
state_before: c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
this : String.prev { data := List.reverse l ++ c :: r } { byteIdx := utf8Len l + csize c } = { byteIdx := utf8Len l }
⊢ { s := { data := List.reverse l ++ c :: r }, i := { byteIdx := utf8Len l } }.s.data = List.reverseAux l (c :: r)

tactic: simp
state_before: c : Char
l r : List Char
h :
  ValidFor (c :: l) r
    { s := { data := List.reverse (c :: l) ++ r }, i := { byteIdx := utf8Len (List.reverse (c :: l)) } }
this : String.prev { data := List.reverse l ++ c :: r } { byteIdx := utf8Len l + csize c } = { byteIdx := utf8Len l }
⊢ { s := { data := List.reverse l ++ c :: r }, i := { byteIdx := utf8Len l } }.i.byteIdx = utf8Len l
Theorem: Stream'.Seq.not_terminates_iff
File: Mathlib/Data/Seq/Seq.lean

tactic: simp only [Terminates, TerminatedAt, ← Ne.def, Option.ne_none_iff_isSome, not_exists, iff_self]
state_before: α : Type u
β : Type v
γ : Type w
s : Seq α
⊢ ¬Terminates s ↔ ∀ (n : ℕ), Option.isSome (get? s n) = true
Theorem: CauchySeq.subseq_mem
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: have : ∀ n, ∃ N, ∀ k ≥ N, ∀ l ≥ k, (u l, u k) ∈ V n := fun n => by
  rw [cauchySeq_iff] at hu
  rcases hu _ (hV n) with ⟨N, H⟩
  exact ⟨N, fun k hk l hl => H _ (le_trans hk hl) _ hk⟩
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : CauchySeq u
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n

tactic: obtain ⟨φ : ℕ → ℕ, φ_extr : StrictMono φ, hφ : ∀ n, ∀ l ≥ φ n, (u l, u <| φ n) ∈ V n⟩ :=
  extraction_forall_of_eventually' this
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : CauchySeq u
this : ∀ (n : ℕ), ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n

tactic: exact ⟨φ, φ_extr, fun n => hφ _ _ (φ_extr <| lt_add_one n).le⟩
state_before: case intro.intro
α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : CauchySeq u
this : ∀ (n : ℕ), ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n
φ : ℕ → ℕ
φ_extr : StrictMono φ
hφ : ∀ (n l : ℕ), l ≥ φ n → (u l, u (φ n)) ∈ V n
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n

tactic: rw [cauchySeq_iff] at hu
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : CauchySeq u
n : ℕ
⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n

tactic: rcases hu _ (hV n) with ⟨N, H⟩
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : ∀ (V : Set (α × α)), V ∈ 𝓤 α → ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V
n : ℕ
⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n

tactic: exact ⟨N, fun k hk l hl => H _ (le_trans hk hl) _ hk⟩
state_before: case intro
α : Type u
β : Type v
inst✝ : UniformSpace α
V : ℕ → Set (α × α)
hV : ∀ (n : ℕ), V n ∈ 𝓤 α
u : ℕ → α
hu : ∀ (V : Set (α × α)), V ∈ 𝓤 α → ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V
n N : ℕ
H : ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V n
⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n
Theorem: QuotientRing.quotientMap_coe_coe
File: Mathlib/Topology/Algebra/Ring/Ideal.lean

tactic: rintro ⟨⟨x⟩, ⟨y⟩⟩
state_before: R : Type u_1
inst✝² : TopologicalSpace R
inst✝¹ : CommRing R
N : Ideal R
inst✝ : TopologicalRing R
⊢ Function.Surjective fun p => (↑(mk N) p.fst, ↑(mk N) p.snd)

tactic: exact ⟨(x, y), rfl⟩
state_before: case mk.mk.mk
R : Type u_1
inst✝² : TopologicalSpace R
inst✝¹ : CommRing R
N : Ideal R
inst✝ : TopologicalRing R
fst✝ snd✝ : R ⧸ N
x y : R
⊢ ∃ a, (fun p => (↑(mk N) p.fst, ↑(mk N) p.snd)) a = (Quot.mk Setoid.r x, Quot.mk Setoid.r y)
Theorem: RatFunc.ofFractionRing_one
File: Mathlib/FieldTheory/RatFunc.lean

tactic: simp only [One.one, OfNat.ofNat, RatFunc.one]
state_before: K : Type u
inst✝ : CommRing K
⊢ { toFractionRing := 1 } = 1
Theorem: Fin.tail_update_succ
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: ext j
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i : Fin n
y : α (succ i)
z : α 0
⊢ tail (update q (succ i) y) = update (tail q) i y

tactic: by_cases h : j = i
state_before: case h
m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i : Fin n
y : α (succ i)
z : α 0
j : Fin n
⊢ tail (update q (succ i) y) j = update (tail q) i y j

tactic: rw [h]
state_before: case pos
m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i : Fin n
y : α (succ i)
z : α 0
j : Fin n
h : j = i
⊢ tail (update q (succ i) y) j = update (tail q) i y j

tactic: simp [tail]
state_before: case pos
m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i : Fin n
y : α (succ i)
z : α 0
j : Fin n
h : j = i
⊢ tail (update q (succ i) y) i = update (tail q) i y i

tactic: simp [tail, (Fin.succ_injective n).ne h, h]
state_before: case neg
m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α (succ i)
i : Fin n
y : α (succ i)
z : α 0
j : Fin n
h : ¬j = i
⊢ tail (update q (succ i) y) j = update (tail q) i y j
Theorem: List.Func.length_neg
File: Mathlib/Data/List/Func.lean

tactic: simp only [neg, length_map]
state_before: α : Type u
β : Type v
γ : Type w
inst✝ : Neg α
as : List α
⊢ length (neg as) = length as
Theorem: Set.image_eq_range
File: Mathlib/Data/Set/Image.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
⊢ f '' s = range fun x => f ↑x

tactic: constructor
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
⊢ x✝ ∈ f '' s ↔ x✝ ∈ range fun x => f ↑x

tactic: rintro ⟨x, h1, h2⟩
state_before: case h.mp
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
⊢ x✝ ∈ f '' s → x✝ ∈ range fun x => f ↑x

case h.mpr
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s

tactic: exact ⟨⟨x, h1⟩, h2⟩
state_before: case h.mp.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
x : α
h1 : x ∈ s
h2 : f x = x✝
⊢ x✝ ∈ range fun x => f ↑x

case h.mpr
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s

tactic: rintro ⟨⟨x, h1⟩, h2⟩
state_before: case h.mpr
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
⊢ (x✝ ∈ range fun x => f ↑x) → x✝ ∈ f '' s

tactic: exact ⟨x, h1, h2⟩
state_before: case h.mpr.intro.mk
α : Type u_1
β : Type u_2
γ : Type ?u.92494
ι : Sort ?u.92497
ι' : Sort ?u.92500
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
x✝ : β
x : α
h1 : x ∈ s
h2 : (fun x => f ↑x) { val := x, property := h1 } = x✝
⊢ x✝ ∈ f '' s
Theorem: MultilinearMap.map_update_smul
File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

tactic: have :
  f ((Finset.univ.erase i).piecewise (c • update m i x) (update m i x)) =
    (∏ _i in Finset.univ.erase i, c) • f (update m i x) :=
  map_piecewise_smul f _ _ _
state_before: R : Type u
ι : Type u'
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝³ : (i : ι) → Module R (M₁ i)
inst✝² : Module R M₂
f f' : MultilinearMap R M₁ M₂
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
m : (i : ι) → M₁ i
i : ι
c : R
x : M₁ i
⊢ ↑f (update (c • m) i x) = c ^ (Fintype.card ι - 1) • ↑f (update m i x)

tactic: simpa [← Function.update_smul c m] using this
state_before: R : Type u
ι : Type u'
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁸ : CommSemiring R
inst✝⁷ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝³ : (i : ι) → Module R (M₁ i)
inst✝² : Module R M₂
f f' : MultilinearMap R M₁ M₂
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
m : (i : ι) → M₁ i
i : ι
c : R
x : M₁ i
this :
  ↑f (Finset.piecewise (Finset.erase Finset.univ i) (c • update m i x) (update m i x)) =
    (∏ _i in Finset.erase Finset.univ i, c) • ↑f (update m i x)
⊢ ↑f (update (c • m) i x) = c ^ (Fintype.card ι - 1) • ↑f (update m i x)
Theorem: zpow_bit0_neg
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: rw [zpow_bit0', zpow_bit0', neg_mul_neg]
state_before: α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝¹ : DivisionMonoid α
inst✝ : HasDistribNeg α
x : α
n : ℤ
⊢ (-x) ^ bit0 n = x ^ bit0 n
Theorem: Finset.sup_congr
File: Mathlib/Data/Finset/Lattice.lean

tactic: subst hs
state_before: F : Type ?u.17780
α : Type u_2
β : Type u_1
γ : Type ?u.17789
ι : Type ?u.17792
κ : Type ?u.17795
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s s₁ s₂ : Finset β
f✝ g✝ : β → α
a : α
f g : β → α
hs : s₁ = s₂
hfg : ∀ (a : β), a ∈ s₂ → f a = g a
⊢ sup s₁ f = sup s₂ g

tactic: exact Finset.fold_congr hfg
state_before: F : Type ?u.17780
α : Type u_2
β : Type u_1
γ : Type ?u.17789
ι : Type ?u.17792
κ : Type ?u.17795
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s s₁ : Finset β
f✝ g✝ : β → α
a : α
f g : β → α
hfg : ∀ (a : β), a ∈ s₁ → f a = g a
⊢ sup s₁ f = sup s₁ g
Theorem: Int.card_fintype_Icc_of_le
File: Mathlib/Data/Int/Interval.lean

tactic: rw [card_fintype_Icc, toNat_sub_of_le h]
state_before: a b : ℤ
h : a ≤ b + 1
⊢ ↑(Fintype.card ↑(Set.Icc a b)) = b + 1 - a
Theorem: Rel.edgeDensity_nonneg
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: apply div_nonneg <;> exact_mod_cast Nat.zero_le _
state_before: 𝕜 : Type ?u.15095
ι : Type ?u.15098
κ : Type ?u.15101
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
s : Finset α
t : Finset β
⊢ 0 ≤ edgeDensity r s t
Theorem: List.zipWith_map_left
File: Mathlib/Data/List/Zip.lean

tactic: convert zipWith_map f g id l l'
state_before: α : Type u
β : Type u_2
γ : Type u_3
δ : Type u_1
ε : Type ?u.35705
f : α → β → γ
g : δ → α
l : List δ
l' : List β
⊢ zipWith f (map g l) l' = zipWith (f ∘ g) l l'

tactic: exact Eq.symm (List.map_id _)
state_before: case h.e'_2.h.e'_6
α : Type u
β : Type u_2
γ : Type u_3
δ : Type u_1
ε : Type ?u.35705
f : α → β → γ
g : δ → α
l : List δ
l' : List β
⊢ l' = map id l'
Theorem: Zsqrtd.nonneg_add_lem
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: have : Nonneg ⟨Int.subNatNat x z, Int.subNatNat w y⟩ :=
  Int.subNatNat_elim x z
    (fun m n i => SqLe y d m 1 → SqLe n 1 w d → Nonneg ⟨i, Int.subNatNat w y⟩)
    (fun j k =>
      Int.subNatNat_elim w y
        (fun m n i => SqLe n d (k + j) 1 → SqLe k 1 m d → Nonneg ⟨Int.ofNat j, i⟩)
        (fun _ _ _ _ => trivial) fun m n xy zw => sqLe_cancel zw xy)
    (fun j k =>
      Int.subNatNat_elim w y
        (fun m n i => SqLe n d k 1 → SqLe (k + j + 1) 1 m d → Nonneg ⟨-[j+1], i⟩)
        (fun m n xy zw => sqLe_cancel xy zw) fun m n xy zw =>
        let t := Nat.le_trans zw (sqLe_of_le (Nat.le_add_right n (m + 1)) le_rfl xy)
        have : k + j + 1 ≤ k :=
          Nat.mul_self_le_mul_self_iff.2 (by simpa [one_mul] using t)
        absurd this (not_le_of_gt <| Nat.succ_le_succ <| Nat.le_add_right _ _))
    (nonnegg_pos_neg.1 xy) (nonnegg_neg_pos.1 zw)
state_before: d x y z w : ℕ
xy : Nonneg { re := ↑x, im := -↑y }
zw : Nonneg { re := -↑z, im := ↑w }
⊢ Nonneg ({ re := ↑x, im := -↑y } + { re := -↑z, im := ↑w })

tactic: rw [add_def, neg_add_eq_sub]
state_before: d x y z w : ℕ
xy : Nonneg { re := ↑x, im := -↑y }
zw : Nonneg { re := -↑z, im := ↑w }
this : Nonneg { re := subNatNat x z, im := subNatNat w y }
⊢ Nonneg ({ re := ↑x, im := -↑y } + { re := -↑z, im := ↑w })

tactic: rwa [Int.subNatNat_eq_coe, Int.subNatNat_eq_coe] at this
state_before: d x y z w : ℕ
xy : Nonneg { re := ↑x, im := -↑y }
zw : Nonneg { re := -↑z, im := ↑w }
this : Nonneg { re := subNatNat x z, im := subNatNat w y }
⊢ Nonneg { re := ↑x + -↑z, im := ↑w - ↑y }

tactic: simpa [one_mul] using t
state_before: d x y z w : ℕ
xy✝ : Nonneg { re := ↑x, im := -↑y }
zw✝ : Nonneg { re := -↑z, im := ↑w }
j k m n : ℕ
xy : SqLe (n + m + 1) d k 1
zw : SqLe (k + j + 1) 1 n d
t : 1 * (k + j + 1) * (k + j + 1) ≤ 1 * k * k := Nat.le_trans zw (sqLe_of_le (Nat.le_add_right n (m + 1)) le_rfl xy)
⊢ (k + j + 1) * (k + j + 1) ≤ k * k
Theorem: Matrix.conjTranspose_nonsing_inv
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: rw [inv_def, inv_def, conjTranspose_smul, det_conjTranspose, adjugate_conjTranspose,
  Ring.inverse_star]
state_before: l : Type ?u.187052
m : Type u
n : Type u'
α : Type v
inst✝³ : Fintype n
inst✝² : DecidableEq n
inst✝¹ : CommRing α
A B : Matrix n n α
inst✝ : StarRing α
⊢ A⁻¹ᴴ = Aᴴ⁻¹
Theorem: CategoryTheory.Arrow.inv_left_hom_right
File: Mathlib/CategoryTheory/Arrow.lean

tactic: simp only [w, IsIso.inv_comp_eq]
state_before: T : Type u
inst✝¹ : Category T
f g : Arrow T
sq : f ⟶ g
inst✝ : IsIso sq
⊢ inv sq.left ≫ f.hom ≫ sq.right = g.hom
Theorem: Polynomial.card_supp_le_succ_natDegree
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [← Finset.card_range (p.natDegree + 1)]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
⊢ card (support p) ≤ natDegree p + 1

tactic: exact Finset.card_le_of_subset supp_subset_range_natDegree_succ
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
⊢ card (support p) ≤ card (range (natDegree p + 1))
Theorem: List.lookmap_cons_some
File: Mathlib/Data/List/Basic.lean

tactic: simp only [lookmap, lookmap.go, Array.toListAppend_eq, Array.data_toArray, nil_append]
state_before: ι : Type ?u.343019
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
a b : α
l : List α
h : f a = some b
⊢ lookmap f (a :: l) = b :: l

tactic: rw [h]
state_before: ι : Type ?u.343019
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → Option α
a b : α
l : List α
h : f a = some b
⊢ (match f a with
    | some b => b :: l
    | none => lookmap.go f l (Array.push #[] a)) =
    b :: l
Theorem: Int.mod_add_div'
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.mul_comm]
state_before: m k : Int
⊢ mod m k + div m k * k = m

tactic: apply mod_add_div
state_before: m k : Int
⊢ mod m k + k * div m k = m
Theorem: Ideal.map_toCotangent_ker
File: Mathlib/RingTheory/Ideal/Cotangent.lean

tactic: rw [Ideal.toCotangent, Submodule.ker_mkQ, pow_two, Submodule.map_smul'' I ⊤ (Submodule.subtype I),
  Algebra.id.smul_eq_mul, Submodule.map_subtype_top]
state_before: R : Type u
S : Type v
S' : Type w
inst✝⁶ : CommRing R
inst✝⁵ : CommSemiring S
inst✝⁴ : Algebra S R
inst✝³ : CommSemiring S'
inst✝² : Algebra S' R
inst✝¹ : Algebra S S'
inst✝ : IsScalarTower S S' R
I : Ideal R
⊢ Submodule.map (Submodule.subtype I) (LinearMap.ker (toCotangent I)) = I ^ 2