Chapter 4. Syntax

Table of Contents

Terms & co.
Lexical conventions
Terms
Definitions and declarations
axiom
definition
(co)inductive types declaration
record
Proofs
theorem
variant
lemma
fact
remark

To describe syntax in this manual we use the following conventions:

  1. Non terminal symbols are emphasized and have a link to their definition. E.g.: term

  2. Terminal symbols are in bold. E.g.: theorem

  3. Optional sequences of elements are put in square brackets. E.g.: [in term]

  4. Alternatives are put in square brakets and they are separated by vertical bars. E.g.: [<|>]

  5. Repetition of sequences of elements are given by putting the first sequence in square brackets, that are followed by three dots. E.g.: [and term]…

Terms & co.

Lexical conventions

Table 4.1. id

id::=〈〈TODO〉〉 

Table 4.2. nat

nat::=〈〈TODO〉〉 

Table 4.3. uri

uri::=〈〈TODO〉〉 

Terms

Table 4.4. Terms

term::=stermsimple or delimited term
 |term termapplication
 |λargs.termλ-abstraction
 |Πargs.termdependent product meant to define a datatype
 |args.termdependent product meant to define a proposition
 |term termnon-dependent product (logical implication or function space)
 |let [id|(id: term)] term in termlocal definition
 |let [co]rec id [id|(id[,term]… :term)]… [on nat] [: term] term (co)recursive definitions
   [and [id|(id[,term]… :term)]… [on nat] [: term] term]…  
   in term  
 |user provided notation

Table 4.5. Simple terms

sterm::=(term) 
 |id[\subst[ idterm [;idterm]… ]] identifier with optional explicit named substitution
 |uria qualified reference
 |Propthe impredicative sort of propositions
 |Setthe impredicate sort of datatypes
 |Typeone predicative sort of datatypes
 |?implicit argument
 |?n [[ [_|term]… ]]metavariable
 |match term [ in term ] [ return term ] with case analysis
   [ match_pattern term [ | match_pattern term ]…]  
 |(term:term)cast
 |user provided notation at precedence 90

Table 4.6. Arguments

args::= _[: term] ignored argument
 | (_[: term]) ignored argument
 |id[,id]…[: term] 
 |(id[,id]…[: term]) 

Table 4.7. Miscellaneous arguments

args2::=id 
 |(id[,id]…: term) 

Table 4.8. Pattern matching

match_pattern::=id0-ary constructor
 |(id id [id]…)n-ary constructor (binds the n arguments)