2415 lines
69 KiB
Text
2415 lines
69 KiB
Text
result:
|
||
[(prelude "prelude") (eoi "")]
|
||
result:
|
||
[(import "import" [(import_path [] `me)]) (eoi "")]
|
||
error at line 1, column 0:
|
||
expected command
|
||
partial syntax tree:
|
||
[(eoi "")]
|
||
error at line 1, column 6:
|
||
unexpected end of file
|
||
expected identifier
|
||
partial syntax tree:
|
||
[(import "import" [(import_path [] <missing>) <missing>]) (eoi "")]
|
||
result:
|
||
[(prelude "prelude")
|
||
(import "import" [(import_path ["." "."] `a) (import_path [] `b)])
|
||
(import "import" [(import_path [] `c)])
|
||
(eoi "")]
|
||
result:
|
||
[(command.open
|
||
"open"
|
||
[(command.open_spec `me [] [] [] []) (command.open_spec `you [] [] [] [])])
|
||
(eoi "")]
|
||
result:
|
||
[(command.open
|
||
"open"
|
||
[(command.open_spec
|
||
`me
|
||
[(command.open_spec.as "as" `you)]
|
||
[(command.open_spec.only ["(" `a] [`b `c] ")")]
|
||
[(command.open_spec.renaming
|
||
["(" "renaming"]
|
||
[(command.open_spec.renaming.item `a "->" `b)
|
||
(command.open_spec.renaming.item `c "->" `d)]
|
||
")")]
|
||
[(command.open_spec.hiding "(" "hiding" [`a `b] ")")])])
|
||
(eoi "")]
|
||
error at line 1, column 11:
|
||
expected command
|
||
partial syntax tree:
|
||
[(command.open
|
||
"open"
|
||
[(command.open_spec `me [] [] [] []) (command.open_spec `you [] [] [] [])])
|
||
(eoi "")]
|
||
error at line 1, column 5:
|
||
expected identifier
|
||
error at line 1, column 9:
|
||
unexpected end of file
|
||
expected identifier
|
||
partial syntax tree:
|
||
[(command.open
|
||
"open"
|
||
[(command.open_spec <missing> <missing> <missing> <missing> <missing>)
|
||
<missing>])
|
||
(command.open
|
||
"open"
|
||
[(command.open_spec <missing> <missing> <missing> <missing> <missing>)
|
||
<missing>])
|
||
(eoi "")]
|
||
error at line 1, column 8:
|
||
expected command
|
||
partial syntax tree:
|
||
[(command.open "open" [(command.open_spec `me [] [] [] [])])
|
||
(command.open "open" [(command.open_spec `you [] [] [] [])])
|
||
(eoi "")]
|
||
result:
|
||
[(command.open "open" [(command.open_spec `a [] [] [] [])])
|
||
(command.section
|
||
"section"
|
||
[`b]
|
||
[(command.open "open" [(command.open_spec `c [] [] [] [])])
|
||
(command.section
|
||
"section"
|
||
[`d]
|
||
[(command.open "open" [(command.open_spec `e [] [] [] [])])]
|
||
"end"
|
||
[`d])]
|
||
"end"
|
||
[`b])
|
||
(eoi "")]
|
||
result:
|
||
[(command.section "section" [`a] [] "end" []) (eoi "")]
|
||
Type (max u v) : Type ((max u v)+1)
|
||
result:
|
||
[(command.check
|
||
"#check"
|
||
(term.app
|
||
(term.app
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (0 `max)))
|
||
(term.ident `u []))
|
||
(term.ident `v [])))
|
||
(eoi "")]
|
||
(ok "notationa`+`:65 b:65 :=nat.addab")
|
||
error at line 221, column 6:
|
||
unexpected '='
|
||
error at line 223, column 44:
|
||
unexpected '='
|
||
expected ":=", "." or "|"
|
||
error at line 226, column 63:
|
||
unexpected '='
|
||
expected ")"
|
||
error at line 229, column 12:
|
||
unexpected '▸'
|
||
expected ":="
|
||
result:
|
||
[(prelude "prelude")
|
||
(command.notation
|
||
"notation"
|
||
(command.notation_spec
|
||
(1
|
||
(command.notation_spec.rules
|
||
[]
|
||
[(command.notation_spec.rule
|
||
(command.notation_spec.notation_symbol
|
||
(0 (command.notation_spec.notation_quoted_symbol "`" "Prop" "`" [])))
|
||
[])])))
|
||
":="
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (4 (number (0 "0"))))))
|
||
(command.notation
|
||
"notation"
|
||
(command.notation_spec
|
||
(1
|
||
(command.notation_spec.rules
|
||
[`f]
|
||
[(command.notation_spec.rule
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" $ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "1")))])))
|
||
[(command.notation_spec.transition
|
||
(2
|
||
(command.notation_spec.argument
|
||
`a
|
||
[(command.notation_spec.action
|
||
":"
|
||
(command.notation_spec.action_kind (0 (number (0 "0")))))])))])])))
|
||
":="
|
||
(term.app (term.ident `f []) (term.ident `a [])))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (0 "prefix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
"¬"
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "40")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (0 "prefix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
"~"
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "40")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∧ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "35")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" /\\ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "35")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" \\/ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "30")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∨ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "30")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" <-> "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "20")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ↔ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "20")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" = "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" == "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ≠ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ≈ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ~ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ≡ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⬝ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "75")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ▸ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "75")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ▹ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "75")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⊕ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "30")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" × "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "35")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" + "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "65")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" - "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "65")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" * "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" / "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" % "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" %ₙ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (0 "prefix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
"-"
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "100")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ^ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "80")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∘ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "90")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" <= "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ≤ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" < "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" >= "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ≥ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" > "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (0 "prefix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
"!"
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "40")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" && "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "35")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" || "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "30")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∈ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∉ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∩ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∪ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "65")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⊆ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⊇ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⊂ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ⊃ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" \\ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "70")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (1 "infix"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ∣ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "50")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" ++ "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "65")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (3 "infixr"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
" :: "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "67")))]))))
|
||
(command.reserve_mixfix
|
||
["reserve" (command.mixfix.kind (2 "infixl"))]
|
||
(command.notation_spec.notation_symbol
|
||
(0
|
||
(command.notation_spec.notation_quoted_symbol
|
||
"`"
|
||
"; "
|
||
"`"
|
||
[(command.notation_spec.precedence ":" (number (0 "1")))]))))
|
||
(command.universes "universes" [`u `v `w])
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Auxiliary meta constant used by the compiler when erasing proofs from code. -/"]
|
||
[]
|
||
[]
|
||
["meta"]
|
||
[])
|
||
(command.declaration.inner
|
||
(5
|
||
(command.constant
|
||
"constant"
|
||
(term.ident `lc_proof [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])
|
||
"}")))]
|
||
[(command.decl_type ":" (term.ident `α []))])))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Auxiliary meta constant used by the compiler to mark unreachable code. -/"]
|
||
[]
|
||
[]
|
||
["meta"]
|
||
[])
|
||
(command.declaration.inner
|
||
(5
|
||
(command.constant
|
||
"constant"
|
||
(term.ident `lc_unreachable [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))]
|
||
[(command.decl_type ":" (term.ident `α []))])))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Auxiliary meta constant used by the compiler to mark type casting. -/"]
|
||
[]
|
||
[]
|
||
["meta"]
|
||
[])
|
||
(command.declaration.inner
|
||
(5
|
||
(command.constant
|
||
"constant"
|
||
(term.ident `lc_cast [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))]
|
||
[(command.decl_type ":" (term.arrow (term.ident `α []) "→" (term.ident `β [])))])))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `inline [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `id [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `a []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `inline [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `flip [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `φ [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `w))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `f [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `α [])
|
||
"→"
|
||
(term.arrow (term.ident `β []) "→" (term.ident `φ []))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `β [])
|
||
"→"
|
||
(term.arrow (term.ident `α []) "→" (term.ident `φ []))))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `b [])))
|
||
(term.binder_id (0 (term.ident `a [])))]
|
||
[]
|
||
[])))
|
||
","
|
||
(term.app (term.app (term.ident `f []) (term.ident `a [])) (term.ident `b []))))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `inline [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `id_delta [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `a []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Gadget for optional parameter support. -/"]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `reducible [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `opt_param [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `default [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `α []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Gadget for marking output parameters in type classes. -/"]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `reducible [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `out_param [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `α []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Auxiliary declaration used to implement the notation (a : α) -/"]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `reducible [])] "]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `typed_expr [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `a []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `macro_inline [])] "]")])
|
||
(command.declaration.inner
|
||
(1
|
||
(command.abbreviation
|
||
"abbreviation"
|
||
(term.ident `id_rhs [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `a []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `punit [])
|
||
(command.decl_sig
|
||
[]
|
||
[(command.decl_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))])
|
||
[]
|
||
[(command.intro_rule
|
||
"|"
|
||
`star
|
||
[]
|
||
(command.decl_sig [] [(command.decl_type ":" (term.ident `punit []))]))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- An abbreviation for `punit.{0}`, its most common instantiation.\n This type should be preferred over `punit` where possible to avoid\n unnecessary universe parameters. -/"]
|
||
[]
|
||
[]
|
||
[]
|
||
[])
|
||
(command.declaration.inner
|
||
(1
|
||
(command.abbreviation
|
||
"abbreviation"
|
||
(term.ident `unit [])
|
||
(command.decl_sig [] [(command.decl_type ":" (term.sort (1 "Type")))])
|
||
(command.decl_val (0 (command.simple_decl_val ":=" (term.ident `punit []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `pattern [])] "]")])
|
||
(command.declaration.inner
|
||
(1
|
||
(command.abbreviation
|
||
"abbreviation"
|
||
(term.ident `unit.star [])
|
||
(command.decl_sig [] [(command.decl_type ":" (term.ident `unit []))])
|
||
(command.decl_val
|
||
(0 (command.simple_decl_val ":=" (term.ident `punit.star []))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `thunk [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))])
|
||
[]
|
||
":="
|
||
[]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `fn [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `unit []) "→" (term.ident `α [])))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `thunk.pure [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `thunk []) (term.ident `α [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.ident `a []))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `thunk.get [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `thunk []) (term.ident `α [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.app (term.ident `x.fn []) (term.paren "(" [] ")")))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `thunk.map [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `f [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `α []) "→" (term.ident `β [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `thunk []) (term.ident `α [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `thunk []) (term.ident `β [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.app (term.ident `f []) (term.ident `x.get [])))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `thunk.bind [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `thunk []) (term.ident `α [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `f [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `α [])
|
||
"→"
|
||
(term.app (term.ident `thunk []) (term.ident `β []))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `thunk []) (term.ident `β [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.projection
|
||
(term.paren "(" [(term.app (term.ident `f []) (term.ident `x.get []))] ")")
|
||
"."
|
||
(term.projection_spec (0 `get))))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `task [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))])
|
||
[]
|
||
":="
|
||
[]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `fn [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `unit []) "→" (term.ident `α [])))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `task.pure [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `task []) (term.ident `α [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.ident `a []))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `task.get [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `task []) (term.ident `α [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `α []))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.app (term.ident `x.fn []) (term.paren "(" [] ")")))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `task.map [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `f [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `α []) "→" (term.ident `β [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `task []) (term.ident `α [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `task []) (term.ident `β [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.app (term.ident `f []) (term.ident `x.get [])))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [(command.visibility (1 "protected"))] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `task.bind [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `v))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `x [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.ident `task []) (term.ident `α [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `f [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `α [])
|
||
"→"
|
||
(term.app (term.ident `task []) (term.ident `β []))))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `task []) (term.ident `β [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.anonymous_constructor
|
||
"⟨"
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1 (term.binder_content [(term.binder_id (1 (term.hole "_")))] [] [])))
|
||
","
|
||
(term.projection
|
||
(term.paren "(" [(term.app (term.ident `f []) (term.ident `x.get []))] ")")
|
||
"."
|
||
(term.projection_spec (0 `get))))]
|
||
"⟩"))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `true [])
|
||
(command.decl_sig [] [(command.decl_type ":" (term.ident `Prop []))])
|
||
[]
|
||
[(command.intro_rule
|
||
"|"
|
||
`intro
|
||
[]
|
||
(command.decl_sig [] [(command.decl_type ":" (term.ident `true []))]))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `false [])
|
||
(command.decl_sig [] [(command.decl_type ":" (term.ident `Prop []))])
|
||
[]
|
||
[]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `empty [])
|
||
(command.decl_sig [] [(command.decl_type ":" (term.sort (1 "Type")))])
|
||
[]
|
||
[]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `not [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `Prop []))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.arrow (term.ident `a []) "→" (term.ident `false [])))))))))
|
||
(command.mixfix
|
||
(command.mixfix.kind (0 "prefix"))
|
||
(command.notation_spec.notation_symbol
|
||
(0 (command.notation_spec.notation_quoted_symbol "`" "¬" "`" [])))
|
||
":="
|
||
(term.ident `not []))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `eq [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.arrow (term.ident `α []) "→" (term.ident `Prop [])))])
|
||
[]
|
||
[(command.intro_rule
|
||
"|"
|
||
`refl
|
||
[]
|
||
(command.decl_sig
|
||
[]
|
||
[(command.decl_type ":" (term.app (term.ident `eq []) (term.ident `a [])))]))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute
|
||
"@["
|
||
[(command.attr_instance `elab_as_eliminator [])
|
||
","
|
||
(command.attr_instance `inline [])
|
||
","
|
||
(command.attr_instance `reducible [])]
|
||
"]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[(command.old_univ_params "{" [`u1 `u2] "}")]
|
||
(term.ident `eq.ndrec [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u2))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `C [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `α [])
|
||
"→"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u1)))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `m [])))]
|
||
[(term.binder_content_type ":" (term.app (term.ident `C []) (term.ident `a [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `h [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.app (term.ident `eq []) (term.ident `a [])) (term.ident `b [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `C []) (term.ident `b [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.explicit (term.explicit_modifier (0 "@")) (term.ident `eq.rec []))
|
||
(term.ident `α []))
|
||
(term.ident `a []))
|
||
(term.paren
|
||
"("
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α []))) (term.binder_id (1 (term.hole "_")))]
|
||
[]
|
||
[])))
|
||
","
|
||
(term.app (term.ident `C []) (term.ident `α [])))]
|
||
")"))
|
||
(term.ident `m []))
|
||
(term.ident `b []))
|
||
(term.ident `h [])))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute
|
||
"@["
|
||
[(command.attr_instance `elab_as_eliminator [])
|
||
","
|
||
(command.attr_instance `inline [])
|
||
","
|
||
(command.attr_instance `reducible [])]
|
||
"]")])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[(command.old_univ_params "{" [`u1 `u2] "}")]
|
||
(term.ident `eq.ndrec_on [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u2))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `C [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow
|
||
(term.ident `α [])
|
||
"→"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u1)))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `h [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.app (term.ident `eq []) (term.ident `a [])) (term.ident `b [])))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `m [])))]
|
||
[(term.binder_content_type ":" (term.app (term.ident `C []) (term.ident `a [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.app (term.ident `C []) (term.ident `b [])))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.app
|
||
(term.explicit (term.explicit_modifier (0 "@")) (term.ident `eq.rec []))
|
||
(term.ident `α []))
|
||
(term.ident `a []))
|
||
(term.paren
|
||
"("
|
||
[(term.lambda
|
||
"λ"
|
||
(term.binders
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α []))) (term.binder_id (1 (term.hole "_")))]
|
||
[]
|
||
[])))
|
||
","
|
||
(term.app (term.ident `C []) (term.ident `α [])))]
|
||
")"))
|
||
(term.ident `m []))
|
||
(term.ident `b []))
|
||
(term.ident `h []))
|
||
(term.ident `init_quot [])))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(7
|
||
(command.inductive
|
||
"inductive"
|
||
(term.ident `heq [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type
|
||
":"
|
||
(term.pi
|
||
"Π"
|
||
(term.binders
|
||
(0
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))]))
|
||
","
|
||
(term.arrow (term.ident `β []) "→" (term.ident `Prop []))))])
|
||
[]
|
||
[(command.intro_rule
|
||
"|"
|
||
`refl
|
||
[]
|
||
(command.decl_sig
|
||
[]
|
||
[(command.decl_type ":" (term.app (term.ident `heq []) (term.ident `a [])))]))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `prod [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (1 "Type")) (level.leading (5 `v))))]
|
||
[])))
|
||
")")))]
|
||
[])
|
||
[]
|
||
":="
|
||
[]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `fst [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))))
|
||
(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `snd [])))]
|
||
[(term.binder_content_type ":" (term.ident `β []))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
["/-- Similar to `prod`, but α and β can be propositions.\n We use this type internally to automatically generate the brec_on recursor. -/"]
|
||
[]
|
||
[]
|
||
[]
|
||
[])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `pprod [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])))
|
||
")")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `β [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `v))))]
|
||
[])))
|
||
")")))]
|
||
[])
|
||
[]
|
||
":="
|
||
[]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `fst [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])))
|
||
")")))))
|
||
(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `snd [])))]
|
||
[(term.binder_content_type ":" (term.ident `β []))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `and [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))
|
||
(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `Prop []))])
|
||
[]
|
||
":="
|
||
[(command.structure_ctor `intro [] "::")]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `left [])))]
|
||
[(term.binder_content_type ":" (term.ident `a []))]
|
||
[])))
|
||
")")))))
|
||
(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `right [])))]
|
||
[(term.binder_content_type ":" (term.ident `b []))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `and.elim_left [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))
|
||
(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `h [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.app (term.ident `and []) (term.ident `a [])) (term.ident `b [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `a []))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.projection
|
||
(term.ident `h [])
|
||
"."
|
||
(term.projection_spec (1 (number (0 "1"))))))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(0
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `and.elim_right [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))
|
||
(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `h [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.app (term.app (term.ident `and []) (term.ident `a [])) (term.ident `b [])))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `b []))])
|
||
(command.decl_val
|
||
(0
|
||
(command.simple_decl_val
|
||
":="
|
||
(term.projection
|
||
(term.ident `h [])
|
||
"."
|
||
(term.projection_spec (1 (number (0 "2"))))))))))))
|
||
(command.declaration
|
||
(command.decl_modifiers [] [] [] [] [])
|
||
(command.declaration.inner
|
||
(8
|
||
(command.structure
|
||
"structure"
|
||
(term.ident `iff [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))
|
||
(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `Prop []))]
|
||
[])))
|
||
")")))]
|
||
[(command.decl_type ":" (term.ident `Prop []))])
|
||
[]
|
||
":="
|
||
[(command.structure_ctor `intro [] "::")]
|
||
[(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `mp [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `a []) "→" (term.ident `b [])))]
|
||
[])))
|
||
")")))))
|
||
(command.structure_field
|
||
(1
|
||
(term.bracketed_binder
|
||
(0
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `mpr [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `b []) "→" (term.ident `a [])))]
|
||
[])))
|
||
")")))))]))))
|
||
(command.mixfix
|
||
(command.mixfix.kind (1 "infix"))
|
||
(command.notation_spec.notation_symbol
|
||
(command.notation_spec.notation_quoted_symbol
|
||
<missing>
|
||
<missing>
|
||
<missing>
|
||
<missing>))
|
||
<missing>
|
||
<missing>)
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute "@[" [(command.attr_instance `pattern [])] "]")])
|
||
(command.declaration.inner
|
||
(command.def
|
||
"def"
|
||
[]
|
||
(term.ident `rfl [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))]
|
||
[(command.decl_type ":" (term.ident `a []))])
|
||
(command.decl_val (command.simple_decl_val <missing> <missing>)))))
|
||
(command.declaration
|
||
(command.decl_modifiers
|
||
[]
|
||
[]
|
||
[]
|
||
[]
|
||
[(command.decl_attribute
|
||
"@["
|
||
[(command.attr_instance `elab_as_eliminator [])]
|
||
"]")])
|
||
(command.declaration.inner
|
||
(command.theorem
|
||
"theorem"
|
||
(term.ident `eq.subst [])
|
||
(command.decl_sig
|
||
[(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `α [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.sort_app (term.sort (0 "Sort")) (level.leading (5 `u))))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `P [])))]
|
||
[(term.binder_content_type
|
||
":"
|
||
(term.arrow (term.ident `α []) "→" (term.ident `Prop [])))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(1
|
||
(term.implicit_binder
|
||
"{"
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `a [])))
|
||
(term.binder_id (0 (term.ident `b [])))]
|
||
[(term.binder_content_type ":" (term.ident `α []))]
|
||
[])
|
||
"}")))
|
||
(term.bracketed_binder
|
||
(term.explicit_binder
|
||
"("
|
||
(term.explicit_binder_content
|
||
(1
|
||
(term.binder_content
|
||
[(term.binder_id (0 (term.ident `h₁ [])))]
|
||
[(term.binder_content_type ":" (term.ident `a []))]
|
||
[])))
|
||
<missing>))
|
||
<missing>]
|
||
<missing>)
|
||
<missing>)))
|
||
(command.notation
|
||
"notation"
|
||
(command.notation_spec (1 (command.notation_spec.rules [`h1] [])))
|
||
<missing>
|
||
<missing>)
|
||
(eoi "")]
|