@@ -5,6 +5,7 @@ Authors: Ching-Tsun Chou
55-/
66
77import Cslib.Computability.Automata.DA.Basic
8+ import Cslib.Foundations.Semantics.FLTS.Prod
89
910/-! # Product of deterministic automata. -/
1011
@@ -17,20 +18,19 @@ variable {State1 State2 Symbol : Type*}
1718
1819namespace DA
1920
20- /-- The product of two deterministic automata.
21- TODO: This operation could be generalised to FLTS and lifted here. -/
21+ /-- The product of two deterministic automata. -/
2222@ [scoped grind =]
2323def prod (da1 : DA State1 Symbol) (da2 : DA State2 Symbol) : DA (State1 × State2) Symbol where
24+ toFLTS := da1.toFLTS.prod da2.toFLTS
2425 start := (da1.start, da2.start)
25- tr := fun (s1, s2) x ↦ (da1.tr s1 x, da2.tr s2 x)
2626
2727/-- A state is reachable by the product automaton iff its components are reachable by
28- the respective component automata . -/
28+ the respective automaton components . -/
2929@ [simp, scoped grind =]
3030theorem prod_mtr_eq (da1 : DA State1 Symbol) (da2 : DA State2 Symbol)
3131 (s : State1 × State2) (xs : List Symbol) :
32- (da1.prod da2).mtr s xs = (da1.mtr s.fst xs, da2.mtr s.snd xs) := by
33- induction xs generalizing s <;> grind
32+ (da1.prod da2).mtr s xs = (da1.mtr s.fst xs, da2.mtr s.snd xs) :=
33+ FLTS.prod_mtr_eq da1.toFLTS da2.toFLTS s xs
3434
3535end DA
3636
0 commit comments