internlm/Lean-Github huggingface dataset:
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
p : UFormula L μ
⊢ elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) (fun n => n.pred) p =
    p.bv
Tactic:
simp[Function.comp]
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
p : UFormula L μ
⊢ elim 0 0 (fun {k} f v => (List.ofFn fun x => (v x).bv).sup) (fun {k} f v => (List.ofFn fun x => (v x).bv).sup)
      (fun m n => max m n) (fun m n => max m n) (fun n => n - 1) (fun n => n - 1) p =
    p.bv
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
p : UFormula L μ
⊢ elim 0 0 (fun {k} f v => (List.ofFn fun x => (v x).bv).sup) (fun {k} f v => (List.ofFn fun x => (v x).bv).sup)
      (fun m n => max m n) (fun m n => max m n) (fun n => n - 1) (fun n => n - 1) p =
    p.bv
Tactic:
induction p <;> simp[elim, *]
Proof state after:
case rel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv

case nrel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
case rel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv

case nrel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Tactic:
{ simp[List.sup_ofFn] }
Proof state after:
case nrel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
case nrel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Tactic:
{ simp[List.sup_ofFn] }
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
case rel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Tactic:
simp[List.sup_ofFn]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.bv_primrec
Proof state before:
case nrel
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
hr : Primrec fun p => (List.map UTerm.bv (List.ofFn p.snd.2)).sup
hb : Primrec₂ fun m n => max m n
hq : Primrec fun n => n.pred
this :
  Primrec
    (elim 0 0 (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup)
      (fun {k} f v => (List.map UTerm.bv (List.ofFn ⟨k, (f, v)⟩.snd.2)).sup) (fun m n => max m n) (fun m n => max m n)
      (fun n => n.pred) fun n => n.pred)
arity✝ : ℕ
a✝¹ : L.Rel arity✝
a✝ : Fin arity✝ → UTerm L μ
⊢ (List.ofFn fun x => (a✝ x).bv).sup = Finset.univ.sup fun x => (a✝ x).bv
Tactic:
simp[List.sup_ofFn]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.depth_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
⊢ Primrec depth
Tactic:
have := elim_primrec (L := L) (μ := μ) 0 0 (const 0) (const 0) (succ.comp₂ nat_max) (succ.comp₂ nat_max) succ succ
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim 0 0 (fun {k} f v => 0) (fun {k} f v => 0) (fun a b => (max a b).succ) (fun a b => (max a b).succ) Nat.succ
      Nat.succ)
⊢ Primrec depth
Theorem: LO.FirstOrder.UFormula.depth_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim 0 0 (fun {k} f v => 0) (fun {k} f v => 0) (fun a b => (max a b).succ) (fun a b => (max a b).succ) Nat.succ
      Nat.succ)
⊢ Primrec depth
Tactic:
exact this.of_eq <| fun p => by induction p <;> simp[elim, depth, *]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.depth_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim 0 0 (fun {k} f v => 0) (fun {k} f v => 0) (fun a b => (max a b).succ) (fun a b => (max a b).succ) Nat.succ
      Nat.succ)
p : UFormula L μ
⊢ elim 0 0 (fun {k} f v => 0) (fun {k} f v => 0) (fun a b => (max a b).succ) (fun a b => (max a b).succ) Nat.succ
      Nat.succ p =
    p.depth
Tactic:
induction p <;> simp[elim, depth, *]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.neg_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
⊢ Primrec neg
Tactic:
have := elim_primrec (L := L) (μ := μ) falsum verum nrel_primrec rel_primrec or_primrec and_primrec ex_primrec all_primrec
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all)
⊢ Primrec neg
Theorem: LO.FirstOrder.UFormula.neg_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all)
⊢ Primrec neg
Tactic:
exact this.of_eq <| fun p => by simp; induction p <;> simp[elim, neg, *]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.neg_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all)
p : UFormula L μ
⊢ elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all p =
    p.neg
Tactic:
simp
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all)
p : UFormula L μ
⊢ elim falsum verum (fun {k} f v => nrel f v) (fun {k} f v => rel f v) or and ex all p = p.neg
Theorem: LO.FirstOrder.UFormula.neg_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this :
  Primrec
    (elim falsum verum (fun {k} f v => nrel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2)
      (fun {k} f v => rel ⟨k, (f, v)⟩.snd.1 ⟨k, (f, v)⟩.snd.2) or and ex all)
p : UFormula L μ
⊢ elim falsum verum (fun {k} f v => nrel f v) (fun {k} f v => rel f v) or and ex all p = p.neg
Tactic:
induction p <;> simp[elim, neg, *]
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
⊢ Primrec inversion
Tactic:
have : Primrec (fun x => ((WType.inversion (equivW L μ x)).1, (WType.inversion (equivW L μ x)).2.map (equivW L μ).symm)) :=
  Primrec₂.pair.comp (fst.comp $ w_inversion.comp of_equiv)
  <| list_map (snd.comp $ w_inversion.comp of_equiv) (of_equiv_symm.comp₂ Primrec₂.right)
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
⊢ Primrec inversion
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
⊢ Primrec inversion
Tactic:
apply this.of_eq <| fun p => by
  cases p <;> simp[WType.inversion, inversion, toW_eq_equivW]
  case and => rw[fintypeEquivFin_symm_zero, fintypeEquivFin_symm_one]; simp
  case or => rw[fintypeEquivFin_symm_zero, fintypeEquivFin_symm_one]; simp
  case all p =>
    rw[Equiv.symm_apply_eq]
    exact fintypeArrowEquivFinArrow_app _ _
  case ex =>
    rw[Equiv.symm_apply_eq]
    exact fintypeArrowEquivFinArrow_app _ _
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
p : UFormula L μ
⊢ (((equivW L μ) p).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) p).inversion.2) = p.inversion
Tactic:
cases p <;> simp[WType.inversion, inversion, toW_eq_equivW]
Proof state after:
case and
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 0)) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 1)) = a✝

case or
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 0)) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 1)) = a✝

case all
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝ : UFormula L μ
⊢ (equivW L μ).symm (fintypeArrowEquivFinArrow (fun x => (equivW L μ) a✝) 0) = a✝

case ex
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝ : UFormula L μ
⊢ (equivW L μ).symm (fintypeArrowEquivFinArrow (fun x => (equivW L μ) a✝) 0) = a✝
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 0)) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 1)) = a✝
Tactic:
case and => rw[fintypeEquivFin_symm_zero, fintypeEquivFin_symm_one]; simp
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 0)) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 1)) = a✝
Tactic:
case or => rw[fintypeEquivFin_symm_zero, fintypeEquivFin_symm_one]; simp
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
p : UFormula L μ
⊢ (equivW L μ).symm (fintypeArrowEquivFinArrow (fun x => (equivW L μ) p) 0) = p
Tactic:
case all p =>
  rw[Equiv.symm_apply_eq]
  exact fintypeArrowEquivFinArrow_app _ _
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝ : UFormula L μ
⊢ (equivW L μ).symm (fintypeArrowEquivFinArrow (fun x => (equivW L μ) a✝) 0) = a✝
Tactic:
case ex =>
  rw[Equiv.symm_apply_eq]
  exact fintypeArrowEquivFinArrow_app _ _
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 0)) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) (fintypeEquivFin.symm 1)) = a✝
Tactic:
rw[fintypeEquivFin_symm_zero, fintypeEquivFin_symm_one]
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) false) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) true) = a✝
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
a✝¹ a✝ : UFormula L μ
⊢ (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) false) = a✝¹ ∧
    (equivW L μ).symm (Bool.rec ((equivW L μ) a✝¹) ((equivW L μ) a✝) true) = a✝
Tactic:
simp
Proof state after:
no goals
Theorem: LO.FirstOrder.UFormula.inversion_primrec
Proof state before:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
p : UFormula L μ
⊢ (equivW L μ).symm (fintypeArrowEquivFinArrow (fun x => (equivW L μ) p) 0) = p
Tactic:
rw[Equiv.symm_apply_eq]
Proof state after:
L : Language
μ : Type v
inst✝⁴ : (k : ℕ) → Primcodable (L.Func k)
inst✝³ : (k : ℕ) → Primcodable (L.Rel k)
inst✝² : UniformlyPrimcodable L.Func
inst✝¹ : UniformlyPrimcodable L.Rel
inst✝ : Primcodable μ
this : Primrec fun x => (((equivW L μ) x).inversion.1, List.map (⇑(equivW L μ).symm) ((equivW L μ) x).inversion.2)
p : UFormula L μ
⊢ fintypeArrowEquivFinArrow (fun x => (equivW L μ) p) 0 = (equivW L μ) p