You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dependence relation is a finite, reflexive, and symmetric relation.
11
10
-/
12
11
structureDependencewhere
13
-
r : α → α → Prop
14
-
refl : ∀ a, r a a
15
-
symm: ∀ a b, r a b → r b a
12
+
rel : α → α → Prop
13
+
refl : ∀ a, rel a a
14
+
symm: ∀ a b, rel a b → rel b a
16
15
17
16
/--
18
17
An independence relation is a finite, irreflexive, and symmetric relation.
19
18
-/
20
19
structureIndependencewhere
21
-
r : α → α → Prop
22
-
irrefl : ∀ a, ¬ r a a
23
-
symm : ∀ a b, r a b → r b a
20
+
rel : α → α → Prop
21
+
irrefl : ∀ a, ¬ rel a a
22
+
symm : ∀ a b, rel a b → rel b a
24
23
25
24
variable {I : Independence}
26
25
26
+
variable (I) in
27
27
/--
28
-
The product of two traces (i.e. list of symbols) is the concatenation of the two traces.
29
-
-/
30
-
instance : Mul (List α) := ⟨List.append⟩
31
-
32
-
/--
33
-
The trace equivalence relation is defined as the smallest multiplicative (i.e. concatenation) congruence relation induced by the independence relation `I.r`.
34
-
That is, two traces (i.e. lists of symbols) are equivalent if one can be transformed into the other by a finite sequence of swaps of adjacent independent symbols.
28
+
The trace equivalence relation is the smallest congruence relation induced by the independence relation `I.r`.
29
+
Two traces (i.e. lists of symbols) are equivalent if one can be transformed into the other by a finite sequence of swaps of adjacent independent symbols.
35
30
36
-
More precisely, `ConGen.Rel I.r` is the inductive closure of the following axioms:
37
-
- **Base:** If `I.r a b`, then `[a, b]` is equivalent to `[b, a]` (i.e., swapping adjacent independent symbols).
31
+
The relation is inductively generated by:
32
+
- **Swap:** If `I.r a b`, then `[a, b]` is equivalent to `[b, a]` (swapping adjacent independent symbols).
38
33
- **Reflexivity:** Every word is equivalent to itself.
39
-
- **Symmetry:** If `u` is equivalent to `v`, then `v` is equivalent to `u`.
40
-
- **Transitivity:** If `u` is equivalent to `v` and `v` is equivalent to `w`, then `u` is equivalent to `w`.
41
-
- **Compatibility:** If `u₁` is equivalent to `v₁` and `u₂` is equivalent to `v₂`, then `u₁ ++ u₂` is equivalent to `v₁ ++ v₂`.
42
-
43
-
Thus, two traces are equivalent if and only if one can be obtained from the other by a finite sequence of these operations (or their inverses).
34
+
- **Symmetry:** If `t₁` is equivalent to `t₂`, then `t₂` is equivalent to `t₁`.
35
+
- **Transitivity:** If `t₁` is equivalent to `t₂` and `t₂` is equivalent to `t₃`, then `t₁` is equivalent to `t₃`.
36
+
- **Compatibility:** If `t₁` is equivalent to `t₂` and `t₃` is equivalent to `t₄`, then `t₁ ++ t₃` is equivalent to `t₂ ++ t₄`.
44
37
-/
45
-
deftrace_equiv : List α → List α → Prop :=
46
-
ConGen.Rel I.r
38
+
inductiveTraceEquiv : List α → List α → Prop
39
+
| swap : ∀ a b, I.rel a b → TraceEquiv [a, b] [b, a]
0 commit comments