Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 5a32811

Browse files
committed
revise example
1 parent 5df9905 commit 5a32811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/nextra/pages/en/build/smart-contracts/prover/spec-lang.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,11 +837,11 @@ module 0x42::m {
837837
}
838838
```
839839

840-
Notice that type parameters are supported in global invariants. For example:
840+
Notice that type parameters are supported in global invariants. For example, the invariant above can be rewritten into the below one if `Counter` is generic:
841841

842842
```move
843843
module addr::M {
844-
invariant<Y> forall addr: address where exists<R<Y>>(addr): exists<T<Y>>(addr);
844+
invariant<T> forall a: addr where exists<Counter<T>>(a): global<Counter<T>>(a).value > 0;
845845
}
846846
```
847847

0 commit comments

Comments
 (0)