Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cslib/Foundations/Syntax/Congruence.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ namespace Cslib

/-- An equivalence relation preserved by all contexts. -/
class Congruence (α : Type*) [HasContext α] (r : α → α → Prop) extends
IsEquiv α r, covariant : CovariantClass (HasContext.Context α) α (·[·]) r
IsEquiv α r, covariant : CovariantClass (HasContext.Context α) α (·<[·]) r

end Cslib
2 changes: 1 addition & 1 deletion Cslib/Foundations/Syntax/Context.lean
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class HasContext (Term : Sort*) where
/-- Replaces the hole in the context with a term. -/
fill (c : Context) (t : Term) : Term

@[inherit_doc] notation:max c "[" t "]" => HasContext.fill c t
@[inherit_doc] notation:max c "<[" t "]" => HasContext.fill c t
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion : You might want to add space on the inside of the block brackets. It's an aesthetic choice, but it might make terms look distinct from the surrounding context.


end Cslib
8 changes: 4 additions & 4 deletions Cslib/Languages/CCS/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ instance : HasContext (Process Name Constant) := ⟨Context Name Constant, Conte

/-- Definition of context filling. -/
@[scoped grind =]
theorem isContext_def (c : Context Name Constant) (p : Process Name Constant) :
c[p] = c.fill p := rfl
theorem hasContext_def (c : Context Name Constant) (p : Process Name Constant) :
c<[p] = c.fill p := rfl

/-- Any `Process` can be obtained by filling a `Context` with an atom. This proves that `Context`
is a complete formalisation of syntactic contexts for CCS. -/
theorem Context.complete (p : Process Name Constant) :
∃ c : Context Name Constant, p = c[Process.nil] ∨
∃ k : Constant, p = c[Process.const k] := by
∃ c : Context Name Constant, p = c<[Process.nil] ∨
∃ k : Constant, p = c<[Process.const k] := by
induction p
case nil =>
exists hole
Expand Down