# [WIP] Predicate Notation Version 2 #41

Closed
opened this issue Jul 10, 2019 · 3 comments
Closed

# [WIP] Predicate Notation Version 2#41

opened this issue Jul 10, 2019 · 3 comments
Labels

Derived from #31

## What problem can be solved

The problem can be solved is same as the previous version, but this version is more general.

It's hard to explain new predicate each time is created. Researchers need very high context background to understand the behavior of deprecation logic in the discussion. ex) plasma.build We define the notation for predicates to define and share a new predicate quickly and correctly.

## How does it work in detail

### Dispute scheme and deprecation logic

• The dispute scheme is to prove the validity of state.
• The deprecation logic is to prove deprecation of state.
``````dispution(state, deprecation logic).
``````

### Theorem

```dispution(deprecationA(state) and deprecationB(state)) = dispution(deprecationA(state)) or dispution(deprecationB(state))
dispution(deprecationA(state) or deprecationB(state)) = dispution(deprecationA(state)) and dispution(deprecationB(state))```

### Examples

#### Fee predicate

This formula defamation stands for that fee transfer predicate can be split into fee predicate and ownership predicate.

``````predicate(proveFee(state) and proveDeprecation(state))
= predicate(proveFee(state)) or predicate(proveDeprecation(state))
``````
``````1. predicate(proveFee(state) and proveDeprecation(state))
``````
1. means one predicate has the deprecation logic which is combined from proveFee and proveDeprecation.
``````2. predicate(proveFee(state)) or predicate(proveDeprecation(state))
``````
1. means that two exits run at the same time and if at least one exit succeed the whole state should be exitable.

#### Simple swap predicate

``````predicate(proveDeprecation(state) and (proveInclusion(state.correspondent) or confirmation(state.correspondent))) or predicate(proveInclusion(state.correspondent) and confirmation(state.correspondent))
= predicate(proveDeprecation(state)) or predicate(proveInclusion(state.correspondent) and confirmation(state.correspondent))
= predicate(proveDeprecation(state)) or predicate(proveInclusion(state.correspondent)) or predicate(confirmation(state.correspondent))
``````

#### Payment channel predicate

``````predicate(proveClose(openState)) and channel(deprecation(openState))
``````

#### Dex predicate

``````predicate(proveDeprecation(state)) or (predicate(finalizeExit(state.correspondent)) and predicate(proveDeprecation(state.correspondent)))
``````

## What topic to research next

mentioned this issue Jul 10, 2019
added the label Jul 10, 2019

### weili-go commented Jul 23, 2019

 This is too abstract, can't resonate, can you give some simple examples?

### syuhei176 commented Jul 23, 2019 • edited

 @weili-go Hi! This issue was out of dated. We will use OVM and predicate 2.0 notation described in these articles and we'll also make examples. https://medium.com/plasma-group/introducing-the-ovm-db253287af50 https://hackmd.io/@aTTDQ4GiRVyyce6trnsfpg/S1yGmXVxB ps: We'll write a blog post about our development direction in this week.
closed this Jul 23, 2019

### weili-go commented Jul 23, 2019

 Very nice. Thanks.