Slide 13
Slide 13 text
ʢิʣBTDJJHܕͱTUSJOHܕͷఆٛ
Inductive ascii : Set := Ascii (_ _ _ _ _ _ _ _ : bool).
Definition Ascii.eqb (a b : ascii) : bool :=
match a, b with
| (Ascii a0 a1 a2 a3 a4 a5 a6 a7), (Ascii b0 b1 b2 b3 b4 b5 b6 b7) =>
Bool.eqb a0 b0 && Bool.eqb a1 b1 && Bool.eqb a2 b2 && Bool.eqb a3 b3ɹ&& Bool.eqb a4 b4 && Bool.eqb a5 b5 && Bool.eqb a6 b6 &&
Bool.eqb a7 b7
end.
Inductive string : Set :=
| EmptyString : string
| String : ascii -> string -> string.
Fixpoint String.eqb s1 s2 : bool :=
match s1, s2 with
| EmptyString, EmptyString => true
| (String c1 s1'), (String c2 s2') => Ascii.eqb c1 c2 && String.eqb s1' s2'
| _,_ => false
end.