induct: fixes \<sigma> :: "(String.literal \<times> event_data list) trace"   and j :: "nat"   and x1 :: "String.literal \<Rightarrow> nat option"   and x2 :: "String.literal \<Rightarrow> (nat \<Rightarrow> event_data list set) option"   and x3 :: "nat"   and x4 :: "event_data list set"   and x5 :: "('msaux, 'muaux) mformula"   and x6 :: "Formula.formula"   and P :: "(String.literal \<Rightarrow> nat option) \<Rightarrow> (String.literal \<Rightarrow> (nat \<Rightarrow> event_data list set) option) \<Rightarrow> nat \<Rightarrow> event_data list set \<Rightarrow> ('msaux, 'muaux) mformula \<Rightarrow> Formula.formula \<Rightarrow> bool" assumes "wf_mformula \<sigma> j x1 x2 x3 x4 x5 x6"   and "\<And>t1 t2 n P V R. \<lbrakk>is_simple_eq t1 t2; \<forall>x\<in>fv_trm t1. x < n; \<forall>x\<in>fv_trm t2. x < n\<rbrakk> \<Longrightarrow> P P V n R (MRel (eq_rel n t1 t2)) (formula.Eq t1 t2)"   and "\<And>x n P V R. x < n \<Longrightarrow> P P V n R (MRel empty_table) (formula.Neg (formula.Eq (trm.Var x) (trm.Var x)))"   and "\<And>e ts n P V R. \<lbrakk>\<forall>x\<in>fv (formula.Pred e ts). x < n; \<forall>t\<in>set ts. trm.is_Var t \<or> trm.is_Const t\<rbrakk> \<Longrightarrow> P P V n R (MPred e ts) (formula.Pred e ts)"   and "\<And>P V m \<phi> \<phi>' p n R \<psi> \<psi>' b. \<lbrakk>wf_mformula \<sigma> j P V m UNIV \<phi> \<phi>'; P P V m UNIV \<phi> \<phi>'; wf_mformula \<sigma> j (P(p \<mapsto> Monitor.progress \<sigma> P \<phi>' j)) (V(p \<mapsto> \<lambda>i. {v. length v = m \<and> Formula.sat \<sigma> V v i \<phi>'})) n R \<psi> \<psi>'; P (P(p \<mapsto> Monitor.progress \<sigma> P \<phi>' j)) (V(p \<mapsto> \<lambda>i. {v. length v = m \<and> Formula.sat \<sigma> V v i \<phi>'})) n R \<psi> \<psi>'; {0..<m} \<subseteq> fv \<phi>'; b \<le> m; m = Formula.nfv \<phi>'\<rbrakk> \<Longrightarrow> P P V n R (MLet p m \<phi> \<psi>) (formula.Let p \<phi>' \<psi>')"   and "\<And>P V n R \<phi> \<phi>' \<psi> \<psi>' pos \<chi> buf. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; wf_mformula \<sigma> j P V n R \<psi> \<psi>'; P P V n R \<psi> \<psi>'; if pos then \<chi> = formula.And \<phi>' \<psi>' else \<chi> = formula.And \<phi>' (formula.Neg \<psi>') \<and> fv \<psi>' \<subseteq> fv \<phi>'; wf_mbuf2' \<sigma> P V j n R \<phi>' \<psi>' buf\<rbrakk> \<Longrightarrow> P P V n R (MAnd (fv \<phi>') \<phi> pos (fv \<psi>') \<psi> buf) \<chi>"   and "\<And>P V n R \<phi> \<phi>' x t conf \<psi>'. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; x < n; x \<notin> fv \<phi>'; fv_trm t \<subseteq> fv \<phi>'; (x, t) = conf; \<psi>' = formula.Eq (trm.Var x) t \<or> \<psi>' = formula.Eq t (trm.Var x)\<rbrakk> \<Longrightarrow> P P V n R (MAndAssign \<phi> conf) (formula.And \<phi>' \<psi>')"   and "\<And>P V n R \<phi> \<phi>' \<psi>' conf. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; \<psi>' = formula_of_constraint conf; let (t1, uu_, uu_, t2) = conf in fv_trm t1 \<union> fv_trm t2 \<subseteq> fv \<phi>'\<rbrakk> \<Longrightarrow> P P V n R (MAndRel \<phi> conf) (formula.And \<phi>' \<psi>')"   and "\<And>P V n R l l_pos l_neg l' buf A_pos A_neg. \<lbrakk>list_all2 (\<lambda>\<phi> \<phi>'. wf_mformula \<sigma> j P V n R \<phi> \<phi>' \<and> P P V n R \<phi> \<phi>') l (l_pos @ map remove_neg l_neg); wf_mbufn (Monitor.progress \<sigma> P (formula.Ands l') j) (map (\<lambda>\<psi>. Monitor.progress \<sigma> P \<psi> j) (l_pos @ map remove_neg l_neg)) (map (\<lambda>\<psi> i. qtable n (fv \<psi>) (mem_restr R) (\<lambda>v. Formula.sat \<sigma> V (map the v) i \<psi>)) (l_pos @ map remove_neg l_neg)) buf; (l_pos, l_neg) = partition safe_formula l'; l_pos \<noteq> []; list_all safe_formula (map remove_neg l_neg); A_pos = map fv l_pos; A_neg = map fv l_neg; \<Union> (set A_neg) \<subseteq> \<Union> (set A_pos)\<rbrakk> \<Longrightarrow> P P V n R (MAnds A_pos A_neg l buf) (formula.Ands l')"   and "\<And>P V n R \<phi> \<phi>' \<psi> \<psi>' buf. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; wf_mformula \<sigma> j P V n R \<psi> \<psi>'; P P V n R \<psi> \<psi>'; fv \<phi>' = fv \<psi>'; wf_mbuf2' \<sigma> P V j n R \<phi>' \<psi>' buf\<rbrakk> \<Longrightarrow> P P V n R (MOr \<phi> \<psi> buf) (formula.Or \<phi>' \<psi>')"   and "\<And>P V n R \<phi> \<phi>'. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; fv \<phi>' = {}\<rbrakk> \<Longrightarrow> P P V n R (MNeg \<phi>) (formula.Neg \<phi>')"   and "\<And>P V n R \<phi> \<phi>'. \<lbrakk>wf_mformula \<sigma> j P V (Suc n) (lift_envs R) \<phi> \<phi>'; P P V (Suc n) (lift_envs R) \<phi> \<phi>'\<rbrakk> \<Longrightarrow> P P V n R (MExists \<phi>) (formula.Exists \<phi>')"   and "\<And>P V b n R \<phi> \<phi>' y f g0 \<omega>. \<lbrakk>wf_mformula \<sigma> j P V (b + n) (lift_envs' b R) \<phi> \<phi>'; P P V (b + n) (lift_envs' b R) \<phi> \<phi>'; y < n; y + b \<notin> fv \<phi>'; {0..<b} \<subseteq> fv \<phi>'; fv_trm f \<subseteq> fv \<phi>'; g0 = (fv \<phi>' \<subseteq> {0..<b})\<rbrakk> \<Longrightarrow> P P V n R (MAgg g0 y \<omega> b f \<phi>) (formula.Agg y \<omega> b f \<phi>')"   and "\<And>P V n R \<phi> \<phi>' first buf nts I. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; first = (j = 0); list_all2 (\<lambda>i. qtable n (fv \<phi>') (mem_restr R) (\<lambda>v. Formula.sat \<sigma> V (map the v) i \<phi>')) [min (Monitor.progress \<sigma> P \<phi>' j) (j - 1)..<Monitor.progress \<sigma> P \<phi>' j] buf; list_all2 (\<lambda>i t. t = \<tau> \<sigma> i) [min (Monitor.progress \<sigma> P \<phi>' j) (j - 1)..<j] nts\<rbrakk> \<Longrightarrow> P P V n R (MPrev I \<phi> first buf nts) (formula.Prev I \<phi>')"   and "\<And>P V n R \<phi> \<phi>' first nts I. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; first = (Monitor.progress \<sigma> P \<phi>' j = 0); list_all2 (\<lambda>i t. t = \<tau> \<sigma> i) [Monitor.progress \<sigma> P \<phi>' j - 1..<j] nts\<rbrakk> \<Longrightarrow> P P V n R (MNext I \<phi> first nts) (formula.Next I \<phi>')"   and "\<And>P V n R \<phi> \<phi>' \<psi> \<psi>' args \<phi>'' I buf nts aux. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; wf_mformula \<sigma> j P V n R \<psi> \<psi>'; P P V n R \<psi> \<psi>'; if args_pos args then \<phi>'' = \<phi>' else \<phi>'' = formula.Neg \<phi>'; safe_formula \<phi>'' = args_pos args; args_ivl args = I; args_n args = n; args_L args = fv \<phi>'; args_R args = fv \<psi>'; fv \<phi>' \<subseteq> fv \<psi>'; wf_mbuf2' \<sigma> P V j n R \<phi>' \<psi>' buf; wf_ts \<sigma> P j \<phi>' \<psi>' nts; wf_since_aux \<sigma> V R args \<phi>' \<psi>' aux (Monitor.progress \<sigma> P (formula.Since \<phi>'' I \<psi>') j)\<rbrakk> \<Longrightarrow> P P V n R (MSince args \<phi> \<psi> buf nts aux) (formula.Since \<phi>'' I \<psi>')"   and "\<And>P V n R \<phi> \<phi>' \<psi> \<psi>' args \<phi>'' I buf nts aux. \<lbrakk>wf_mformula \<sigma> j P V n R \<phi> \<phi>'; P P V n R \<phi> \<phi>'; wf_mformula \<sigma> j P V n R \<psi> \<psi>'; P P V n R \<psi> \<psi>'; if args_pos args then \<phi>'' = \<phi>' else \<phi>'' = formula.Neg \<phi>'; safe_formula \<phi>'' = args_pos args; args_ivl args = I; args_n args = n; args_L args = fv \<phi>'; args_R args = fv \<psi>'; fv \<phi>' \<subseteq> fv \<psi>'; wf_mbuf2' \<sigma> P V j n R \<phi>' \<psi>' buf; wf_ts \<sigma> P j \<phi>' \<psi>' nts; wf_until_aux \<sigma> V R args \<phi>' \<psi>' aux (Monitor.progress \<sigma> P (formula.Until \<phi>'' I \<psi>') j); Monitor.progress \<sigma> P (formula.Until \<phi>'' I \<psi>') j + length_muaux args aux = min (Monitor.progress \<sigma> P \<phi>' j) (Monitor.progress \<sigma> P \<psi>' j)\<rbrakk> \<Longrightarrow> P P V n R (MUntil args \<phi> \<psi> buf nts aux) (formula.Until \<phi>'' I \<psi>')"   and "\<And>r P V n R \<phi>s mr mrs buf nts I aux. \<lbrakk>case to_mregex r of (mr', \<phi>s') \<Rightarrow> list_all2 (\<lambda>x1 x2. wf_mformula \<sigma> j P V n R x1 x2 \<and> P P V n R x1 x2) \<phi>s \<phi>s' \<and> mr = mr'; mrs = sorted_list_of_set (RPDs mr); safe_regex Past Strict r; wf_mbufn' \<sigma> P V j n R r buf; wf_ts_regex \<sigma> P j r nts; wf_matchP_aux \<sigma> V n R I r aux (Monitor.progress \<sigma> P (formula.MatchP I r) j)\<rbrakk> \<Longrightarrow> P P V n R (MMatchP I mr mrs \<phi>s buf nts aux) (formula.MatchP I r)"   and "\<And>r P V n R \<phi>s mr mrs buf nts I aux. \<lbrakk>case to_mregex r of (mr', \<phi>s') \<Rightarrow> list_all2 (\<lambda>x1 x2. wf_mformula \<sigma> j P V n R x1 x2 \<and> P P V n R x1 x2) \<phi>s \<phi>s' \<and> mr = mr'; mrs = sorted_list_of_set (LPDs mr); safe_regex Futu Strict r; wf_mbufn' \<sigma> P V j n R r buf; wf_ts_regex \<sigma> P j r nts; wf_matchF_aux \<sigma> V n R I r aux (Monitor.progress \<sigma> P (formula.MatchF I r) j) 0; Monitor.progress \<sigma> P (formula.MatchF I r) j + length aux = progress_regex \<sigma> P r j\<rbrakk> \<Longrightarrow> P P V n R (MMatchF I mr mrs \<phi>s buf nts aux) (formula.MatchF I r)" shows "P x1 x2 x3 x4 x5 x6"