Skip to content

Commit 5a2ff27

Browse files
committed
effect Carlos's change requests plus miscellaneous improvements
+ fix mkdocs hang issue + move EssentialAgda + switch to unicode character for em dash + fix broken links + revert removal of latex packages in flake (needed for diagram generation) + remove repeated console log + rename "Agda Essentials" -> "Essential Agda" to agree with module name + make reference-able NEWEPOCH section and add link to it + improve introduction and remove references to pdf generation
1 parent 617550c commit 5a2ff27

30 files changed

+540
-535
lines changed

build-tools/scripts/md/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def main(run_agda_html_flag: bool = False, test_mode_flag: bool = False) -> None
6767
if static_tex_result.is_err:
6868
logging.error(f"❌ Static LaTeX conversion failed: {static_tex_result.unwrap_err()}")
6969
sys.exit(1)
70-
logging.info(f"✅ Converted {len(static_tex_result.unwrap())} static .tex files to Markdown")
7170

7271
# 4. Process Agda source files (.agda -> .lagda.md)
7372
agda_result = process_agda_source_files(config)

build-tools/static/md/mkdocs/includes/links.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[Agda documentation]: https://agda.readthedocs.io/en/
2-
[Agda Essentials]: Ledger.EssentialAgda.md
32
[Agda record types]: https://agda.readthedocs.io/en/stable/language/record-types.html
43
[Agda Wiki]: https://wiki.portal.chalmers.se/agda/pmwiki.php
54
[Amount of Rewards to be Paid Out]: Ledger.Conway.Specification.Rewards.md#sec:amount-of-rewards-to-be-paid-out
@@ -22,9 +21,12 @@
2221
[DELEG]: Ledger.Conway.Specification.Certs.md#auxiliary-deleg-transition-system
2322
[ENACT]: Ledger.Conway.Specification.Enact.md#sec:the-enact-transition-system
2423
[EPOCH]: Ledger.Conway.Specification.Epoch.md#sec:the-epoch-transition-system
24+
[Epoch]: Ledger.Conway.Specification.Epoch.md
25+
[Epoch Boundary]: Ledger.Conway.Specification.Epoch.md#sec:epoch-boundary
2526
[Epoch.Properties.ConstRwds]: Ledger.Conway.Specification.Epoch.Properties.ConstRwds.md
2627
[Epoch.Properties.GovDepsMatch]: Ledger.Conway.Specification.Epoch.Properties.GovDepsMatch.md
2728
[Epoch.Properties.NoPropSameDReps]: Ledger.Conway.Specification.Epoch.Properties.NoPropSameDReps.md
29+
[Essential Agda]: EssentialAgda.md
2830
[Fees]: Ledger.Conway.Specification.Fees.md
2931
[formal ledger specification]: https://github.com/IntersectMBO/formal-ledger-specifications
3032
[Functions used in UTxO rules]: Ledger.Conway.Specification.Utxo.md#functions-used-in-utxo-rules
@@ -41,15 +43,18 @@
4143
[LEDGERS]: Ledger.Conway.Specification.Ledger.md#ledgers-transition-system
4244
[lem:EpochGovDepsMatch]: Ledger.Conway.Specification.Epoch.Properties.GovDepsMatch.md#lem:EpochGovDepsMatch
4345
[lem:LedgerGovDepsMatch]: Ledger.Conway.Specification.Ledger.Properties.GovDepsMatch.md#lem:LedgerGovDepsMatch
46+
[NEWEPOCH]: Ledger.Conway.Specification.Epoch.md#sec:the-newepoch-transition-system
4447
[Notation]: Notation.md
4548
[Ouroboros Chronos blog post]: https://iohk.io/en/blog/posts/2021/10/27/ouroboros-chronos-provides-the-first-high-resilience-cryptographic-time-source-based-on-blockchain/
4649
[POOL]: Ledger.Conway.Specification.Certs.md#auxiliary-pool-transition-system
47-
[Protocol Parameter Decfinitions]: Ledger.Conway.Specification.PParams.md#sec:protocol-parameter-definitions
50+
[Protocol Parameter Definitions]: Ledger.Conway.Specification.PParams.md#sec:protocol-parameter-definitions
4851
[Ratification Requirements]: Ledger.Conway.Specification.Ratify.md#sec:ratification-requirements
4952
[RATIFY]: Ledger.Conway.Specification.Ratify.md#the-ratify-transition-system
5053
[(Re)introduction to Cardano]: https://developers.cardano.org/docs/operate-a-stake-pool/introduction-to-cardano/
5154
[repourl]: https://github.com/IntersectMBO/formal-ledger-specifications
55+
[Rewards Calculation Timeline]: Ledger.Conway.Specification.Rewards.md#sec:rewards-calculation-timeline
5256
[Rewards Motivation]: Ledger.Conway.Specification.Rewards.md#sec:rewards-motivation
57+
[Script Validation]: Ledger.Conway.Specification.Script.Validation.md#sec:script-validation
5358
[scriptsCost]: Ledger.Conway.Specification.Fees.md#scriptsCost
5459
[Shelley Ledger Spec (pdf)]: https://github.com/intersectmbo/cardano-ledger/releases/latest/download/shelley-ledger.pdf
5560
[SNAP]: Ledger.Conway.Specification.Rewards.md#sec:snap-transition-system
@@ -63,6 +68,6 @@
6368
[Utxo.Properties.PoV]: Ledger.Conway.Specification.Utxo.Properties.PoV.md
6469
[UTXOS]: Ledger.Conway.Specification.Utxo.md#sec:the-utxos-transition-rule
6570
[UTXOW]: Ledger.Conway.Specification.Utxow.md#sec:the-utxow-transition-system
71+
[Utxow module]: Ledger.Conway.Specification.Utxow.md
6672
[Validity and wellformedness predicates]: Ledger.Conway.Specification.Gov.md#validity-and-wellformedness-predicates
67-
[Voting Functions]: Ledger.Conway.Specification.Ratify.md#sec:voting-functions
6873

build-tools/static/md/mkdocs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ extra_javascript:
8686
markdown_extensions:
8787
- admonition # call-out boxes like !!! note
8888
- pymdownx.details
89+
- pymdownx.smartsymbols
8990
- toc: # table of contents generation
9091
permalink: true # anchor links to headers
9192
- pymdownx.superfences: # syntax highlighting in code blocks

build-tools/static/md/nav.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
- Deriving: Foreign.HaskellTypes.Deriving.md
216216
- Appendix/:
217217
- Definitions: Definitions.md
218-
- EssentialAgda: Ledger.EssentialAgda.md
218+
- EssentialAgda: EssentialAgda.md
219219
- Agda Prelude: Prelude.md
220220
- Type Classes:
221221
- Interface:

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@
122122
inherit (texlive)
123123
scheme-small
124124
dejavu
125+
collection-latexextra
126+
collection-latexrecommended
127+
collection-mathscience
128+
bclogo
125129
luatex
126130
luatex85
127131
dvisvgm
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source_branch: master
33
source_path: src/EssentialAgda.lagda.md
44
---
55

6-
# Agda Essentials {#sec:agda-essentials}
6+
# Essential Agda {#sec:essential-agda}
77

88
Here we describe some of the essential concepts and syntax of the Agda
99
programming language and proof assistant. The goal is to provide some
@@ -17,7 +17,7 @@ details, the reader is encouraged to consult the official
1717
```agda
1818
{-# OPTIONS --safe #-}
1919
20-
module Ledger.EssentialAgda where
20+
module EssentialAgda where
2121
2222
open import Prelude using (Type)
2323
open import Data.Nat

src/Interface/STS.lagda.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private
3131
## A Note on Recent Changes
3232

3333
We refactored the `STS`{.AgdaModule} module to reflect what the code actually
34-
does---it processes a list of signals, transforming state.
34+
does--it processes a list of signals, transforming state.
3535

3636
+ **Clearer names**
3737

@@ -48,7 +48,7 @@ does---it processes a list of signals, transforming state.
4848
+ `RunTraceAndThen Step Last Γ s sigs s'` means: starting in `s`, running `sigs`
4949
(left-to-right) under environment `Γ`, then perform `Last`, to yield `s'`.
5050

51-
A variation that is sometimes useful involves indexed steps---that is, it allows the
51+
A variation that is sometimes useful involves indexed steps--that is, it allows the
5252
step relation to depend on the position in the trace via an index `n : ℕ`.
5353

5454
## State Transition Sytem Types

src/Ledger.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ import Ledger.Introduction
44
import Ledger.PreConway
55
import Ledger.Conway
66

7-
import Ledger.EssentialAgda
7+
import EssentialAgda

src/Ledger/Conway/Specification/Certs.lagda.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Sections [Auxiliary `DELEG`{.AgdaDatatype} Transition System](#auxiliary-deleg-t
418418
[Auxiliary `GOVCERT`{.AgdaDatatype} transition system](#auxiliary-govcert-transition-system).
419419

420420
`GOVCERT`{.AgdaDatatype} deals with the new certificates relating to
421-
`DRep`{.AgdaInductiveConstructor}s and the constitutional committee.
421+
`DReps`{.AgdaInductiveConstructor} and the constitutional committee.
422422

423423
+ `GOVCERT-regdrep`{.AgdaInductiveConstructor} registers (or
424424
re-registers) a `DRep`{.AgdaInductiveConstructor}. In case of registration,
@@ -541,7 +541,7 @@ important housekeeping tasks:
541541
+ check the correctness of withdrawals and ensure that withdrawals only
542542
happen from credentials that have delegated their voting power;
543543

544-
+ set the activity timer of all `DRep`{.AgdaInductiveConstructor}s that voted
544+
+ set the activity timer of all `DReps`{.AgdaInductiveConstructor} that voted
545545
to `drepActivity`{.AgdaField} epochs in the future;
546546

547547
+ set the rewards of the credentials that withdrew funds to zero.

src/Ledger/Conway/Specification/Certs/Properties/PoV.lagda.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ module Certs-PoV ( indexedSumᵛ'-∪' : {A : Type} ⦃ _ : DecEq A ⦄ (m m'
6161

6262
*Informally*.
6363

64-
Let `l`{.AgdaBound} be a list of `DCert`{.AgdaDatatype}s, and let `s₁`{.AgdaBound},
65-
`sₙ`{.AgdaBound} be `CertState`{.AgdaRecord}s such that
64+
Let `l`{.AgdaBound} be a list of `DCerts`{.AgdaDatatype}, and let `s₁`{.AgdaBound},
65+
`sₙ`{.AgdaBound} be `CertStates`{.AgdaRecord} such that
6666
`s₁`{.AgdaBound} `⇀⦇`{.AgdaDatatype} `l`{.AgdaBound} `,CERTS⦈`{.AgdaDatatype} `sₙ`{.AgdaBound}.
6767
Then, the value of `s₁`{.AgdaBound} is equal to the value of `sₙ`{.AgdaBound} plus
6868
the value of the withdrawals in `Γ`{.AgdaBound}.

0 commit comments

Comments
 (0)