Section fsm_experiment Inductive state Type s1 state s2 state Inductiv

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Section fsm_experiment.
Inductive state :Type :=
| s1:state
| s2:state.
Inductive input :Type :=
| i1:input
| i2:input.
Definition transitions(s:state)(i:input):state :=
match s, i with
| s1, i1 => s1
| s1, i2 => s2
| s2, i1 => s2
| s2, i2 => s1
end.
Lemma i1_same_state: forall s:state, (transitions s i1) = s.
Proof.
intros.
induction s.
simpl.
reflexivity.
simpl.
reflexivity.
Qed.
Lemma i2_diff_state: forall s:state, ~((transitions s i2) = s).
Proof.
intros.
induction s.
simpl.
End fsm_experiment.