Cairn · module

Cairn.Claim

lean/Cairn/Claim.lean

Claims: statements about the product with durable ids.

The vocabulary is fixed here; the move, flow, invariant, assume and place commands that create claims, and the ledger that guards their ids, live in Cairn.Claims.

Order

Structures 2

structure

Cairn.ClaimInfo

lean/Cairn/Claim.lean:21
ClaimInfo : Type

The human half of a claim: what a reviewer reads next to the formal statement.

Fields
id : ClaimId
kind : ClaimKind
title : String
does : String

What the person does (moves) or what the claim states (others).

sees : String

What follows.

place : Option ClaimId

The place claim this one appears in, if any.

retired : Option String

Retired claims keep their id and say why.

Instances

Inhabited Repr

structure

Cairn.ControlRef

lean/Cairn/Claim.lean:37
ControlRef : Type

One instance of a move's control on screen. A move like "toggle a todo" has one control per todo; key tells them apart (0 when there is only one). Shown as ^5 or ^5#12.

Fields
claim : ClaimId
key : Nat

Inductive types 1

inductive

Cairn.ClaimKind

lean/Cairn/Claim.lean:16
ClaimKind : Type
Constructors
move : ClaimKind
flow : ClaimKind
invariant : ClaimKind
assume : ClaimKind
place : ClaimKind
Instances

Inhabited Repr

Definitions 2

abbrev

Cairn.ClaimId

lean/Cairn/Claim.lean:14
ClaimId : Type

A claim id, written ^N. Never renumbered, reused or deleted.

def

Cairn.ControlRef.label

lean/Cairn/Claim.lean:49
label (c : ControlRef) : String

How a control is written in ids and on the map's pins: ^5, or ^5#12 for a keyed one.

example : ({ claim := 5 } : ControlRef).label = "^5" := by decide
example : ({ claim := 5, key := 12 } : ControlRef).label = "^5#12" := by decide

Instances 9

instance

Cairn.instDecidableEqClaimKind

lean/Cairn/Claim.lean:18
instDecidableEqClaimKind : DecidableEq ClaimKind
instance

Cairn.instInhabitedClaimKind

lean/Cairn/Claim.lean:18
instInhabitedClaimKind : Inhabited ClaimKind
instance

Cairn.instReprClaimKind

lean/Cairn/Claim.lean:18
instReprClaimKind : Repr ClaimKind
instance

Cairn.instInhabitedClaimInfo

lean/Cairn/Claim.lean:33
instInhabitedClaimInfo : Inhabited ClaimInfo
instance

Cairn.instReprClaimInfo

lean/Cairn/Claim.lean:33
instReprClaimInfo : Repr ClaimInfo
instance

Cairn.instDecidableEqControlRef

lean/Cairn/Claim.lean:40
instDecidableEqControlRef : DecidableEq ControlRef
instance

Cairn.instHashableControlRef

lean/Cairn/Claim.lean:40
instHashableControlRef : Hashable ControlRef
instance

Cairn.instReprControlRef

lean/Cairn/Claim.lean:40
instReprControlRef : Repr ControlRef
instance

Cairn.instInhabitedControlRef

lean/Cairn/Claim.lean:40
instInhabitedControlRef : Inhabited ControlRef