module HW23a where
import DFA

-- Construction showing that regular languages are closed under intersection. 
-- Assume M1 and M2 have the same input alphabet sigma1==sigma2.
-- (intersectDFA M1 M2) should return a DFA accepting the
-- intersection of the languages of M1 and M2

intersectDFA :: (Eq st1, Eq st2) =>
  DFA st1 -> DFA st2 -> DFA ... -- specify the type of states of the output DFA
intersectDFA
  (qs1, sigma, delta1, q1, fs1)
  (qs2, sigma2, delta2, q2, fs2)
  | sigma2 == sigma = 
  ... -- give a DFA for the intersection of the languages of the two input DFAs

