l3lab/ntp-mathlib huggingface dataset:
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P → Q) (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
    (hfc : Continuous f) : P →ᵃ[ℝ] Q :=
  let c := Classical.arbitrary P
  AffineMap.mk' f (↑((AddMonoidHom.ofMapMidpoint ℝ ℝ
    ((AffineEquiv.vaddConst ℝ (f <| c)).symm ∘ f ∘ AffineEquiv.vaddConst ℝ c) (by simp)
    fun x y => by -- Porting note: was `by simp [h]`
      

Proof state:
α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
f : P → Q
h : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
hfc : Continuous f
c : P := Classical.arbitrary P
x y : V
⊢ (⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) (midpoint ℝ x y) =
    midpoint ℝ ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) x)
      ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) y)

Next tactic:
simp only [Function.comp_apply, AffineEquiv.vaddConst_apply, AffineEquiv.vaddConst_symm_apply]
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P → Q) (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
    (hfc : Continuous f) : P →ᵃ[ℝ] Q :=
  let c := Classical.arbitrary P
  AffineMap.mk' f (↑((AddMonoidHom.ofMapMidpoint ℝ ℝ
    ((AffineEquiv.vaddConst ℝ (f <| c)).symm ∘ f ∘ AffineEquiv.vaddConst ℝ c) (by simp)
    fun x y => by -- Porting note: was `by simp [h]`
      simp only [Function.comp_apply, AffineEquiv.vaddConst_apply, AffineEquiv.vaddConst_symm_apply]
      

Proof state:
α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
f : P → Q
h : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
hfc : Continuous f
c : P := Classical.arbitrary P
x y : V
⊢ f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P) =
    midpoint ℝ (f (x +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P))
      (f (y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P))

Next tactic:
conv_lhs => rw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h,
          midpoint_vsub_midpoint]
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P → Q) (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
    (hfc : Continuous f) : P →ᵃ[ℝ] Q :=
  let c := Classical.arbitrary P
  AffineMap.mk' f (↑((AddMonoidHom.ofMapMidpoint ℝ ℝ
    ((AffineEquiv.vaddConst ℝ (f <| c)).symm ∘ f ∘ AffineEquiv.vaddConst ℝ c) (by simp)
    fun x y => by -- Porting note: was `by simp [h]`
      simp only [Function.comp_apply, AffineEquiv.vaddConst_apply, AffineEquiv.vaddConst_symm_apply]
      conv_lhs => 

Proof state:
α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
f : P → Q
h : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
hfc : Continuous f
c : P := Classical.arbitrary P
x y : V
| f (midpoint ℝ x y +ᵥ Classical.arbitrary P) -ᵥ f (Classical.arbitrary P)

Next tactic:
rw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h,
          midpoint_vsub_midpoint]
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P → Q) (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
    (hfc : Continuous f) : P →ᵃ[ℝ] Q :=
  let c := Classical.arbitrary P
  AffineMap.mk' f (↑((AddMonoidHom.ofMapMidpoint ℝ ℝ
    ((AffineEquiv.vaddConst ℝ (f <| c)).symm ∘ f ∘ AffineEquiv.vaddConst ℝ c) (by simp)
    fun x y => by -- Porting note: was `by simp [h]`
      simp only [Function.comp_apply, AffineEquiv.vaddConst_apply, AffineEquiv.vaddConst_symm_apply]
      conv_lhs => rw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h,
          midpoint_vsub_midpoint]).toRealLinearMap <| by
        

Proof state:
α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
f : P → Q
h : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
hfc : Continuous f
c : P := Classical.arbitrary P
⊢ Continuous
    ⇑(AddMonoidHom.ofMapMidpoint ℝ ℝ
        (⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c))
        (_ :
          (AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f (Classical.arbitrary P)))) (f (0 +ᵥ Classical.arbitrary P)) = 0)
        (_ :
          ∀ (x y : V),
            (⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) (midpoint ℝ x y) =
              midpoint ℝ ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) x)
                ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) y)))

Next tactic:
apply_rules [Continuous.vadd, Continuous.vsub, continuous_const, hfc.comp, continuous_id]
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P → Q) (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
    (hfc : Continuous f) : P →ᵃ[ℝ] Q :=
  let c := Classical.arbitrary P
  AffineMap.mk' f (↑((AddMonoidHom.ofMapMidpoint ℝ ℝ
    ((AffineEquiv.vaddConst ℝ (f <| c)).symm ∘ f ∘ AffineEquiv.vaddConst ℝ c) (by simp)
    fun x y => by -- Porting note: was `by simp [h]`
      simp only [Function.comp_apply, AffineEquiv.vaddConst_apply, AffineEquiv.vaddConst_symm_apply]
      conv_lhs => rw [(midpoint_self ℝ (Classical.arbitrary P)).symm, midpoint_vadd_midpoint, h, h,
          midpoint_vsub_midpoint]).toRealLinearMap <| by
        apply_rules [Continuous.vadd, Continuous.vsub, continuous_const, hfc.comp, continuous_id]))
    c fun p => by 

Proof state:
α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁷ : SeminormedAddCommGroup V
inst✝⁶ : PseudoMetricSpace P
inst✝⁵ : NormedAddTorsor V P
inst✝⁴ : NormedAddCommGroup W
inst✝³ : MetricSpace Q
inst✝² : NormedAddTorsor W Q
inst✝¹ : NormedSpace ℝ V
inst✝ : NormedSpace ℝ W
f : P → Q
h : ∀ (x y : P), f (midpoint ℝ x y) = midpoint ℝ (f x) (f y)
hfc : Continuous f
c : P := Classical.arbitrary P
p : P
⊢ f p =
    ↑(AddMonoidHom.toRealLinearMap
            (AddMonoidHom.ofMapMidpoint ℝ ℝ
              (⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c))
              (_ :
                (AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f (Classical.arbitrary P))))
                    (f (0 +ᵥ Classical.arbitrary P)) =
                  0)
              (_ :
                ∀ (x y : V),
                  (⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c))
                      (midpoint ℝ x y) =
                    midpoint ℝ
                      ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) x)
                      ((⇑(AffineEquiv.symm (AffineEquiv.vaddConst ℝ (f c))) ∘ f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) y)))
            (_ : Continuous ((fun i => (f ∘ ⇑(AffineEquiv.vaddConst ℝ c)) i) -ᵥ fun i => f c)))
        (p -ᵥ c) +ᵥ
      f c

Next tactic:
simp
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray)
      (fun r l => r.push (a :: l))).toList := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
⊢ ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ =
      Array.toList
        (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁) 0 (Array.size (toArray r₁)))

Next tactic:
intro r₁ r₂
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray)
      (fun r l => r.push (a :: l))).toList := by
  intro r₁ r₂
  

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁ r₂ : List (List α)
⊢ sublists'Aux a r₁ r₂ =
    Array.toList (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁) 0 (Array.size (toArray r₁)))

Next tactic:
rw [sublists'Aux, Array.foldl_eq_foldl_data]
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray)
      (fun r l => r.push (a :: l))).toList := by
  intro r₁ r₂
  rw [sublists'Aux, Array.foldl_eq_foldl_data]
  

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁ r₂ : List (List α)
⊢ foldl (fun r l => r ++ [a :: l]) r₂ r₁ =
    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁).data)

Next tactic:
have := List.foldl_hom Array.toList (fun r l => r.push (a :: l))
    (fun r l => r ++ [a :: l]) r₁ r₂.toArray (by simp)
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray)
      (fun r l => r.push (a :: l))).toList := by
  intro r₁ r₂
  rw [sublists'Aux, Array.foldl_eq_foldl_data]
  have := List.foldl_hom Array.toList (fun r l => r.push (a :: l))
    (fun r l => r ++ [a :: l]) r₁ r₂.toArray (by 

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁ r₂ : List (List α)
⊢ ∀ (x : Array (List α)) (y : List α),
    (fun r l => r ++ [a :: l]) (Array.toList x) y = Array.toList ((fun r l => Array.push r (a :: l)) x y)

Next tactic:
simp
theorem sublists'Aux_eq_array_foldl (a : α) : ∀ (r₁ r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = ((r₁.toArray).foldl (init := r₂.toArray)
      (fun r l => r.push (a :: l))).toList := by
  intro r₁ r₂
  rw [sublists'Aux, Array.foldl_eq_foldl_data]
  have := List.foldl_hom Array.toList (fun r l => r.push (a :: l))
    (fun r l => r ++ [a :: l]) r₁ r₂.toArray (by simp)
  

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁ r₂ : List (List α)
this :
  foldl (fun r l => r ++ [a :: l]) (Array.toList (toArray r₂)) r₁ =
    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) r₁)
⊢ foldl (fun r l => r ++ [a :: l]) r₂ r₁ =
    Array.toList (foldl (fun r l => Array.push r (a :: l)) (toArray r₂) (toArray r₁).data)

Next tactic:
simpa using this
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
l : List α
⊢ sublists' l = foldr (fun a r => sublists'Aux a r r) [[]] l

Next tactic:
simp only [sublists', sublists'Aux_eq_array_foldl]
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  

Proof state:
α : Type u
β : Type v
γ : Type w
l : List α
⊢ Array.toList
      (foldr (fun a arr => Array.foldl (fun r l => Array.push r (a :: l)) arr arr 0 (Array.size arr)) #[[]] l) =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

Next tactic:
rw [← List.foldr_hom Array.toList]
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · 

Proof state:
α : Type u
β : Type v
γ : Type w
l : List α
⊢ foldr ?g₂ (Array.toList #[[]]) l =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

Next tactic:
rfl
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · rfl
  · 

Proof state:
case H
α : Type u
β : Type v
γ : Type w
l : List α
⊢ ∀ (x : α) (y : Array (List α)),
    Array.toList
        (Array.foldl (fun r l => Array.push r (x :: l)) (toArray (Array.toList y)) (toArray (Array.toList y)) 0
          (Array.size (toArray (Array.toList y)))) =
      Array.toList (Array.foldl (fun r l => Array.push r (x :: l)) y y 0 (Array.size y))

Next tactic:
intros _ _
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · rfl
  · intros _ _; 

Proof state:
case H
α : Type u
β : Type v
γ : Type w
l : List α
x✝ : α
y✝ : Array (List α)
⊢ Array.toList
      (Array.foldl (fun r l => Array.push r (x✝ :: l)) (toArray (Array.toList y✝)) (toArray (Array.toList y✝)) 0
        (Array.size (toArray (Array.toList y✝)))) =
    Array.toList (Array.foldl (fun r l => Array.push r (x✝ :: l)) y✝ y✝ 0 (Array.size y✝))

Next tactic:
congr
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · rfl
  · intros _ _; congr <;> 

Proof state:
case H.e_as.h.e_4.h
α : Type u
β : Type v
γ : Type w
l : List α
x✝ : α
y✝ : Array (List α)
⊢ toArray (Array.toList y✝) = y✝

Next tactic:
simp
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · rfl
  · intros _ _; congr <;> 

Proof state:
case H.e_as.h.e_5.h
α : Type u
β : Type v
γ : Type w
l : List α
x✝ : α
y✝ : Array (List α)
⊢ toArray (Array.toList y✝) = y✝

Next tactic:
simp
theorem sublists'_eq_sublists'Aux (l : List α) :
    sublists' l = l.foldr (fun a r => sublists'Aux a r r) [[]] := by
  simp only [sublists', sublists'Aux_eq_array_foldl]
  rw [← List.foldr_hom Array.toList]
  · rfl
  · intros _ _; congr <;> 

Proof state:
case H.e_as.h.e_7.e_a
α : Type u
β : Type v
γ : Type w
l : List α
x✝ : α
y✝ : Array (List α)
⊢ toArray (Array.toList y✝) = y✝

Next tactic:
simp
theorem sublists'Aux_eq_map (a : α) (r₁ : List (List α)) : ∀ (r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁ :=
  List.reverseRecOn r₁ (fun _ => by 

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁ x✝ : List (List α)
⊢ sublists'Aux a [] x✝ = x✝ ++ map (cons a) []

Next tactic:
simp [sublists'Aux]
theorem sublists'Aux_eq_map (a : α) (r₁ : List (List α)) : ∀ (r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁ :=
  List.reverseRecOn r₁ (fun _ => by simp [sublists'Aux]) <| fun r₁ l ih r₂ => by
    

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁✝ r₁ : List (List α)
l : List α
ih : ∀ (r₂ : List (List α)), sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁
r₂ : List (List α)
⊢ sublists'Aux a (r₁ ++ [l]) r₂ = r₂ ++ map (cons a) (r₁ ++ [l])

Next tactic:
rw [map_append, map_singleton, ← append_assoc, ← ih, sublists'Aux, foldl_append, foldl]
theorem sublists'Aux_eq_map (a : α) (r₁ : List (List α)) : ∀ (r₂ : List (List α)),
    sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁ :=
  List.reverseRecOn r₁ (fun _ => by simp [sublists'Aux]) <| fun r₁ l ih r₂ => by
    rw [map_append, map_singleton, ← append_assoc, ← ih, sublists'Aux, foldl_append, foldl]
    

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
r₁✝ r₁ : List (List α)
l : List α
ih : ∀ (r₂ : List (List α)), sublists'Aux a r₁ r₂ = r₂ ++ map (cons a) r₁
r₂ : List (List α)
⊢ foldl (fun r l => r ++ [a :: l]) (foldl (fun r l => r ++ [a :: l]) r₂ r₁ ++ [a :: l]) [] =
    sublists'Aux a r₁ r₂ ++ [a :: l]

Next tactic:
simp [sublists'Aux]
@[simp 900]
theorem sublists'_cons (a : α) (l : List α) :
    sublists' (a :: l) = sublists' l ++ map (cons a) (sublists' l) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
l : List α
⊢ sublists' (a :: l) = sublists' l ++ map (cons a) (sublists' l)

Next tactic:
simp [sublists'_eq_sublists'Aux, foldr_cons, sublists'Aux_eq_map]
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
s t : List α
⊢ s ∈ sublists' t ↔ s <+ t

Next tactic:
induction' t with a t IH generalizing s
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · 

Proof state:
case nil
α : Type u
β : Type v
γ : Type w
s : List α
⊢ s ∈ sublists' [] ↔ s <+ []

Next tactic:
simp only [sublists'_nil, mem_singleton]
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    

Proof state:
case nil
α : Type u
β : Type v
γ : Type w
s : List α
⊢ s = [] ↔ s <+ []

Next tactic:
exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
s : List α
h : s = []
⊢ s <+ []

Next tactic:
rw [h]
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  

Proof state:
case cons
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
⊢ s ∈ sublists' (a :: t) ↔ s <+ a :: t

Next tactic:
simp only [sublists'_cons, mem_append, IH, mem_map]
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  

Proof state:
case cons
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
⊢ (s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s) ↔ s <+ a :: t

Next tactic:
constructor
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> 

Proof state:
case cons.mp
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
⊢ (s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s) → s <+ a :: t

Next tactic:
intro h
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> 

Proof state:
case cons.mpr
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
⊢ s <+ a :: t → s <+ t ∨ ∃ a_2, a_2 <+ t ∧ a :: a_2 = s

Next tactic:
intro h
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; 

Proof state:
case cons.mp
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s
⊢ s <+ a :: t
case cons.mpr
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ a :: t
⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s

Next tactic:
rcases h with (h | ⟨s, h, rfl⟩)
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; rcases h with (h | ⟨s, h, rfl⟩)
  · 

Proof state:
case cons.mp.inl
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ t
⊢ s <+ a :: t

Next tactic:
exact sublist_cons_of_sublist _ h
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; rcases h with (h | ⟨s, h, rfl⟩)
  · exact sublist_cons_of_sublist _ h
  · 

Proof state:
case cons.mp.inr.intro.intro
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ t
⊢ a :: s <+ a :: t

Next tactic:
exact h.cons_cons _
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; rcases h with (h | ⟨s, h, rfl⟩)
  · exact sublist_cons_of_sublist _ h
  · exact h.cons_cons _
  · 

Proof state:
case cons.mpr
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ a :: t
⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s

Next tactic:
cases' h with _ _ _ h s _ _ h
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; rcases h with (h | ⟨s, h, rfl⟩)
  · exact sublist_cons_of_sublist _ h
  · exact h.cons_cons _
  · cases' h with _ _ _ h s _ _ h
    · 

Proof state:
case cons.mpr.cons
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ t
⊢ s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = s

Next tactic:
exact Or.inl h
@[simp]
theorem mem_sublists' {s t : List α} : s ∈ sublists' t ↔ s <+ t := by
  induction' t with a t IH generalizing s
  · simp only [sublists'_nil, mem_singleton]
    exact ⟨fun h => by rw [h], eq_nil_of_sublist_nil⟩
  simp only [sublists'_cons, mem_append, IH, mem_map]
  constructor <;> intro h; rcases h with (h | ⟨s, h, rfl⟩)
  · exact sublist_cons_of_sublist _ h
  · exact h.cons_cons _
  · cases' h with _ _ _ h s _ _ h
    · exact Or.inl h
    · 

Proof state:
case cons.mpr.cons₂
α : Type u
β : Type v
γ : Type w
a : α
t : List α
IH : ∀ {s : List α}, s ∈ sublists' t ↔ s <+ t
s : List α
h : s <+ t
⊢ a :: s <+ t ∨ ∃ a_1, a_1 <+ t ∧ a :: a_1 = a :: s

Next tactic:
exact Or.inr ⟨s, h, rfl⟩
@[simp]
theorem length_sublists' : ∀ l : List α, length (sublists' l) = 2 ^ length l
  | [] => rfl
  | a :: l => by
    

Proof state:
α : Type u
β : Type v
γ : Type w
a : α
l : List α
⊢ length (sublists' (a :: l)) = 2 ^ length (a :: l)

Next tactic:
simp_arith only [sublists'_cons, length_append, length_sublists' l,
      length_map, length, Nat.pow_succ', mul_succ, mul_zero, zero_add]