I was looking at:
Inductive aevalR : aexp -> nat -> Prop :=
| E_ANum : forall (n: nat),
aevalR (ANum n) n
| E_APlus : forall (e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 ->
aevalR e2 n2 ->
aevalR (APlus e1 e2) (n1 + n2)
| E_AMinus: forall (e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 ->
aevalR e2 n2 ->
aevalR (AMinus e1 e2) (n1 - n2)
| E_AMult : forall (e1 e2: aexp) (n1 n2: nat),
aevalR e1 n1 ->
aevalR e2 n2 ->
aevalR (AMult e1 e2) (n1 * n2).
and trying to understand what it meant. I understand that it takes an arithmetic exp. maps that to a function that maps to a nat that maps to a prop. But what confuses me is what is inside the | A_AOp
clauses. They have no period at the end and the plus and minus ones have an arrow pointing to another arrow.
What type of syntax is this and what is it suppose to be saying? What is the input to this inductive type? Like usually I see in python:
def f(a,b,*args):
so I know what I am suppose to give as input (more or less). But This one is confusing me. How do I use this and what does the definition mean?
idk if its suppose to be an easy functional programming question or not since I'm just learning Coq and functional programming and this part wasn't in the functional programming intro of the course I was looking at:
https://softwarefoundations.cis.upenn.edu/lf-current/Imp.html