src/Pure/term_xml.scala
changeset 70533 031620901fcd
parent 43779 47bec02c6762
child 70536 fe4d545f12e3
--- a/src/Pure/term_xml.scala	Wed Aug 14 19:50:23 2019 +0200
+++ b/src/Pure/term_xml.scala	Thu Aug 15 16:02:47 2019 +0200
@@ -53,5 +53,19 @@
         { case (List(a), Nil) => Bound(int_atom(a)) },
         { case (List(a), b) => val (c, d) = pair(typ, term)(b); Abs(a, c, d) },
         { case (Nil, a) => val (b, c) = pair(term, term)(a); App(b, c) }))
+
+    def proof: T[Proof] =
+      variant[Proof](List(
+        { case (Nil, Nil) => MinProof },
+        { case (List(a), Nil) => PBound(int_atom(a)) },
+        { case (List(a), b) => val (c, d) = pair(typ, proof)(b); Abst(a, c, d) },
+        { case (List(a), b) => val (c, d) = pair(term, proof)(b); AbsP(a, c, d) },
+        { case (Nil, a) => val (b, c) = pair(proof, term)(a); Appt(b, c) },
+        { case (Nil, a) => val (b, c) = pair(proof, proof)(a); AppP(b, c) },
+        { case (Nil, a) => Hyp(term(a)) },
+        { case (List(a), b) => PAxm(a, list(typ)(b)) },
+        { case (List(a), b) => OfClass(typ(b), a) },
+        { case (List(a), b) => val (c, d) = pair(term, list(typ))(b); Oracle(a, c, d) },
+        { case (List(a, b), c) => PThm(long_atom(a), b, list(typ)(c)) }))
   }
 }