{"id":21540580,"url":"https://github.com/tchajed/iris-named-props","last_synced_at":"2025-04-10T03:33:57.909Z","repository":{"id":51090512,"uuid":"359173991","full_name":"tchajed/iris-named-props","owner":"tchajed","description":"Named Props for Iris","archived":false,"fork":false,"pushed_at":"2024-10-17T16:18:40.000Z","size":67,"stargazers_count":7,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-19T23:51:17.973Z","etag":null,"topics":["coq","iris"],"latest_commit_sha":null,"homepage":"","language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchajed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-18T15:00:24.000Z","updated_at":"2024-10-18T16:42:44.000Z","dependencies_parsed_at":"2023-11-20T19:42:10.523Z","dependency_job_id":"40070a06-c358-4eb8-8522-b9436a958f44","html_url":"https://github.com/tchajed/iris-named-props","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchajed%2Firis-named-props","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchajed%2Firis-named-props/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchajed%2Firis-named-props/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchajed%2Firis-named-props/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchajed","download_url":"https://codeload.github.com/tchajed/iris-named-props/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226123507,"owners_count":17577055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coq","iris"],"created_at":"2024-11-24T04:19:29.174Z","updated_at":"2024-11-24T04:19:29.670Z","avatar_url":"https://github.com/tchajed.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Named propositions for Iris\n\n[![CI](https://github.com/tchajed/iris-named-props/workflows/CI/badge.svg)](https://github.com/tchajed/iris-named-props/actions/workflows/build.yml?query=workflow%3ACI)\n\nNamed propositions are an extension to the Iris Proof Mode (IPM) that allow you\nto embed names for conjuncts within a definition and then use those names to\nintroduce or destruct the definition. See the header comment in\n[named_props.v](src/named_props.v) for a detailed explanation with the entire\nAPI.\n\nThis library is compatible with the latest version of Iris and Coq 8.16+.\n\n```coq\nFrom iris.proofmode Require Import tactics.\nFrom iris_named_props Require Import named_props.\n\nDefinition foo_rep :=\n (\"HP\" ∷ P ∗\n  \"HR\" ∷ R)%I.\n\nTheorem foo_rep_read_P :\n  foo_rep -∗ P.\nProof.\n iIntros \"H\".\n iNamed \"H\".\n (* at this point we have a context of\n\n \"HP\" : P\n \"HR\" : R\n --------------------------------------∗\n P\n\n *)\n iExact \"HP\".\nQed.\n```\n\nPutting the names in the definition avoids repeating the same intro patterns\nover and over in a proof. Not repeating yourself makes things easier to change\nwhen the definition changes - for example, reordering and adding new conjuncts\nwill have minimal impact on proof scripts.\n\nThe \"names\" in named propositions are not actually just names, but Iris intro\npatterns; for example `\"#H\"`, `\"%H\"` (using Iris's recent support for Coq names\nin intro patterns), and `\"?\"` are all potentially useful.\n\nOne application of this feature implemented in the library is a tactic\n`iNamedAccu` which is like `iAccu` but remembers the names used. If you haven't\nused `iAccu`, it solves a goal which is an evar with the conjunction of the\nentire context (this kind of situation arises when you have a proof rule that\nallows saving the entire context and then restoring it elsewhere). `iNamedAccu`\nis just like `iAccu`, but it adds names to the conjuncts so that the result can\neasily be restored with the same names later.\n\nFor an example of using `iNamedAccu`, see\n[tests/split_delay.v](tests/split_delay.v). We implemented a simple tactic\n`iSplitDelay` that puts all hypotheses on the left side but changes the goal\nfrom `Q1 ∗ Q2` to `(Q1 ∗ ?rest) ∗ (?rest -∗ ?Q2)`. The result is that you can\nprove `Q1` on the left, use `iNamedAccu` to fill `?rest` with the remaining\nhypotheses, and then use `iNamed 1` in the second goal to get back all the\nremaining hypotheses. The upshot is that you don't need to decide upfront how to\nsplit the context.\n\nIf you don't want to use the unicode symbol `∷`, you can import\n`named_props_ascii_notation` to get `::` in `bi_scope`. However, note that this\nconflicts with `::` as a notation for `cons`, which will now require `%list` if\nyou want to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchajed%2Firis-named-props","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchajed%2Firis-named-props","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchajed%2Firis-named-props/lists"}