Skip to content

Commit 727b7a4

Browse files
committed
task 170: complete implementation - submit PR leanprover#642 temporal syntax
Created pr3/temporal-syntax branch from refactor/proposition-lukasiewicz, cherry-picked all 4 temporal syntax files, added BibTeX entries and BibKey citations, added 4 barrel imports to Cslib.lean, passed full CI pipeline, and submitted PR leanprover#642 to leanprover/cslib. PR URL: leanprover#642 Session: sess_1781307197_e61477
1 parent b6e0a38 commit 727b7a4

8 files changed

Lines changed: 609 additions & 4 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"status": "planned",
3+
"summary": "4-phase plan: create clean pr3/temporal-syntax branch from refactor/proposition-lukasiewicz, add Formula.lean + bib entries + barrel import, run CI, submit PR to leanprover/cslib",
4+
"artifacts": [
5+
{
6+
"path": "specs/170_submit_subpr_3_1_3_2_temporal_syntax/reports/01_pr-submission-research.md",
7+
"type": "report",
8+
"summary": "Research report covering upstream state, PR #635 dependency, branch strategy, bib gaps, CI requirements"
9+
},
10+
{
11+
"path": "specs/170_submit_subpr_3_1_3_2_temporal_syntax/plans/01_pr-submission-plan.md",
12+
"type": "plan",
13+
"summary": "4-phase implementation plan: branch creation, references/citations, CI verification, PR submission (1.5 hours)"
14+
}
15+
],
16+
"blockers": [],
17+
"next_action_hint": "implement"
18+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"session_id": "sess_1781302796_867b8d",
3+
"cycle_count": 0,
4+
"max_cycles": 5,
5+
"current_state": "not_started",
6+
"started": "2026-06-12T22:20:27Z",
7+
"last_updated": "2026-06-12T22:20:27Z"
8+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"status": "implemented",
3+
"started_at": "2026-06-12T22:45:00Z",
4+
"completed_at": "2026-06-12T23:55:00Z",
5+
"artifacts": [
6+
"specs/170_submit_subpr_3_1_3_2_temporal_syntax/reports/01_pr-submission-research.md",
7+
"specs/170_submit_subpr_3_1_3_2_temporal_syntax/plans/01_pr-submission-plan.md",
8+
"specs/170_submit_subpr_3_1_3_2_temporal_syntax/summaries/01_pr-submission-summary.md"
9+
],
10+
"pr_url": "https://github.com/leanprover/cslib/pull/642",
11+
"pr_branch": "pr3/temporal-syntax",
12+
"verification": {
13+
"verification_passed": true,
14+
"sorry_count": 0,
15+
"vacuous_count": 0,
16+
"axiom_count": 0,
17+
"build_passed": true,
18+
"ci_pipeline_passed": true,
19+
"checks": {
20+
"lake_build": "passed",
21+
"lake_exe_checkInitImports": "passed",
22+
"lake_exe_lint_style": "passed",
23+
"lake_exe_mk_all_check": "passed (No update necessary)",
24+
"lake_test": "passed (exit code 0)"
25+
}
26+
},
27+
"partial_progress": {
28+
"stage": "completed",
29+
"details": "All 4 phases completed. PR #642 submitted to leanprover/cslib."
30+
},
31+
"metadata": {
32+
"session_id": "sess_1781307197_e61477",
33+
"agent_type": "cslib-implementation-agent",
34+
"delegation_depth": 1,
35+
"delegation_path": ["orchestrator", "implement", "skill-pr-implementation"],
36+
"compliance_check": "passed"
37+
}
38+
}
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
# Implementation Plan: Submit Sub-PR 3.1 (Temporal Formula Type)
2+
3+
- **Task**: 170 - Submit Sub-PR 3.1: Temporal formula type
4+
- **Status**: [COMPLETED]
5+
- **Effort**: 1.5 hours
6+
- **Dependencies**: Task 138 (Connectives.lean / PR #635 must be open as base)
7+
- **Research Inputs**: specs/170_submit_subpr_3_1_3_2_temporal_syntax/reports/01_pr-submission-research.md
8+
- **Artifacts**: plans/01_pr-submission-plan.md (this file)
9+
- **Standards**: plan-format.md, status-markers.md, artifact-management.md, tasks.md
10+
- **Type**: pr
11+
- **Lean Intent**: false
12+
13+
## Overview
14+
15+
Create a clean PR branch `pr3/temporal-syntax` based on `refactor/proposition-lukasiewicz` (PR #635's branch), containing only Formula.lean (~582 lines), the barrel import entry in Cslib.lean, and two new references.bib entries. The PR stacks on PR #635 because Formula.lean imports `Cslib.Foundations.Logic.Connectives` which only exists on that branch. Citation format in Formula.lean must be updated from informal text to BibKey format per CSLib standards. Context.lean, BigConj.lean, and Subformulas.lean are explicitly out of scope (deferred to task 160 / Sub-PR 3.2).
16+
17+
### Research Integration
18+
19+
Key findings from report 01_pr-submission-research.md:
20+
- PR #635 is open but not yet merged upstream; branch strategy must stack on it
21+
- Formula.lean imports `Cslib.Foundations.Logic.Connectives` for `TemporalConnectives` -- hard dependency
22+
- references.bib is missing `Kamp1968` and `GabbayPnueliShelahStavi1980` entries
23+
- CI checks: `lake build --wfail --iofail`, `lake test`, `mk_all --check --module`, `checkInitImports`, `lint-style-action`
24+
- The existing `pr3/temporal-formula` branch carries the full fork diff (80+ files) and cannot be reused
25+
- CONTRIBUTING.md requires AI usage disclosure in the PR description
26+
27+
### Prior Plan Reference
28+
29+
No prior plan.
30+
31+
### Roadmap Alignment
32+
33+
This plan advances the "Temporal syntax infrastructure" roadmap item listed under Completed:
34+
- `Temporal syntax infrastructure (Context, BigConj, Subformulas)` in `Logics/Temporal/Syntax/`
35+
- Formula.lean is the core type that underpins the entire Temporal module tree
36+
37+
## Goals & Non-Goals
38+
39+
**Goals**:
40+
- Create a clean branch `pr3/temporal-syntax` from `refactor/proposition-lukasiewicz`
41+
- Cherry-pick/extract only `Formula.lean` (582 lines) into the branch
42+
- Add barrel import `Cslib.Logics.Temporal.Syntax.Formula` to `Cslib.lean`
43+
- Add `Kamp1968` and `GabbayPnueliShelahStavi1980` BibTeX entries to `references.bib`
44+
- Update Formula.lean citation format from informal to BibKey
45+
- Pass all CI checks (lake build, lake test, mk_all, checkInitImports, lint-style)
46+
- Submit PR to `leanprover/cslib` with proper description and AI disclosure
47+
48+
**Non-Goals**:
49+
- Including Context.lean, BigConj.lean, or Subformulas.lean (those are Sub-PR 3.2 / task 160)
50+
- Addressing eric-wieser's Bot/HImp comment on PR #635 (that is task 138's concern)
51+
- Waiting for PR #635 to merge before submitting (stacked PRs are accepted)
52+
53+
## Risks & Mitigations
54+
55+
| Risk | Impact | Likelihood | Mitigation |
56+
|------|--------|------------|------------|
57+
| PR #635 not yet merged, blocking reviewability | M | H | Clearly state dependency in PR description; stacked PRs are accepted practice in cslib |
58+
| Formula.lean produces warnings under --wfail | H | L | File compiles cleanly on fork main; verify on PR branch before submission |
59+
| mk_all --check fails due to missing barrel entry | H | L | Phase 2 adds the Cslib.lean entry; verify with mk_all before PR |
60+
| checkInitImports fails for transitive import | M | L | Formula.lean has `public import Cslib.Init` via Connectives; verify explicitly |
61+
| BibKey format incorrect or lint-style rejects it | M | L | Follow exact format from existing files (Modal/Basic.lean, Propositional/Defs.lean) |
62+
| PR #607 (fmontesi/connectives) merges first, breaking imports | H | L | Monitor #607 status; our PR depends on #635 not #607 |
63+
64+
## Implementation Phases
65+
66+
**Dependency Analysis**:
67+
| Wave | Phases | Blocked by |
68+
|------|--------|------------|
69+
| 1 | 1 | -- |
70+
| 2 | 2 | 1 |
71+
| 3 | 3 | 2 |
72+
| 4 | 4 | 3 |
73+
74+
Phases are sequential because each depends on the branch state from the prior phase.
75+
76+
---
77+
78+
### Phase 1: Create clean PR branch [COMPLETED]
79+
80+
**Goal**: Create `pr3/temporal-syntax` branch from `refactor/proposition-lukasiewicz` with only Formula.lean added.
81+
82+
**Tasks**:
83+
- [ ] Fetch latest upstream and origin remotes (`git fetch upstream && git fetch origin`)
84+
- [ ] Create branch `pr3/temporal-syntax` from `refactor/proposition-lukasiewicz` (`git checkout -b pr3/temporal-syntax refactor/proposition-lukasiewicz`)
85+
- [ ] Copy `Formula.lean` from fork main: `git checkout main -- Cslib/Logics/Temporal/Syntax/Formula.lean`
86+
- [ ] Create directory if needed: `mkdir -p Cslib/Logics/Temporal/Syntax/`
87+
- [ ] Verify the file is present and has expected content (~582 lines)
88+
- [ ] Stage and commit: `git add Cslib/Logics/Temporal/Syntax/Formula.lean`
89+
90+
**Timing**: 15 minutes
91+
92+
**Depends on**: none
93+
94+
**Files to modify**:
95+
- `Cslib/Logics/Temporal/Syntax/Formula.lean` - add (cherry-pick from main)
96+
97+
**Verification**:
98+
- Branch exists based on `refactor/proposition-lukasiewicz`
99+
- Only Formula.lean is added relative to the base branch
100+
- `git diff refactor/proposition-lukasiewicz --name-only` shows only the new file(s)
101+
102+
---
103+
104+
### Phase 2: Update references and citations [COMPLETED]
105+
106+
**Goal**: Add missing BibTeX entries to references.bib and convert Formula.lean citations to BibKey format.
107+
108+
**Tasks**:
109+
- [ ] Add `Kamp1968` BibTeX entry to `references.bib` (in alphabetical position after `Jech2003` or similar K-entries)
110+
- [ ] Add `GabbayPnueliShelahStavi1980` BibTeX entry to `references.bib` (in alphabetical position after `FisherEtAl2019` or similar G-entries)
111+
- [ ] Update Formula.lean `## References` section from informal format to BibKey format:
112+
- Change to: `* [H. Kamp, *Tense Logic and the Theory of Linear Order*][Kamp1968]`
113+
- Change to: `* [D. Gabbay, A. Pnueli, S. Shelah, J. Stavi, *On the temporal analysis of fairness*][GabbayPnueliShelahStavi1980]`
114+
- [ ] Add barrel import to `Cslib.lean`: insert `public import Cslib.Logics.Temporal.Syntax.Formula` in alphabetical position (after `Logics.Propositional.NaturalDeduction.Basic`, before `MachineLearning.PACLearning.Defs`)
115+
- [ ] Stage and commit all changes
116+
117+
**Timing**: 20 minutes
118+
119+
**Depends on**: 1
120+
121+
**Files to modify**:
122+
- `references.bib` - add 2 BibTeX entries
123+
- `Cslib/Logics/Temporal/Syntax/Formula.lean` - update References section
124+
- `Cslib.lean` - add 1 barrel import entry
125+
126+
**Verification**:
127+
- `grep -c "Kamp1968" references.bib` returns 1
128+
- `grep -c "GabbayPnueliShelahStavi1980" references.bib` returns 1
129+
- `grep "Cslib.Logics.Temporal.Syntax.Formula" Cslib.lean` finds the entry
130+
- Formula.lean References section uses `[BibKey]` bracket format
131+
132+
---
133+
134+
### Phase 3: CI verification [COMPLETED]
135+
136+
**Goal**: Run all CI checks locally and fix any issues before PR submission.
137+
138+
**Tasks**:
139+
- [ ] Run `lake build Cslib.Logics.Temporal.Syntax.Formula` (or full `lake build --wfail --iofail`) to verify no build errors or warnings
140+
- [ ] Run `lake test` to ensure no test regressions
141+
- [ ] Run `lake exe mk_all --check --module` to verify barrel completeness
142+
- [ ] Run `lake exe checkInitImports` to verify Init import chain
143+
- [ ] Run `lake exe lint-style` (or equivalent lint check) to verify style compliance
144+
- [ ] Fix any issues found and re-run failed checks
145+
- [ ] Commit any fixes
146+
147+
**Timing**: 30 minutes (includes build time)
148+
149+
**Depends on**: 2
150+
151+
**Files to modify**:
152+
- Any files that need fixes from CI check failures (likely none)
153+
154+
**Verification**:
155+
- All 5 CI checks pass with exit code 0
156+
- No warnings in build output (--wfail is strict)
157+
158+
---
159+
160+
### Phase 4: Submit PR [COMPLETED]
161+
162+
**Goal**: Push branch and create PR on `leanprover/cslib` with proper description and dependency declaration.
163+
164+
**Tasks**:
165+
- [ ] Push branch to origin: `git push origin pr3/temporal-syntax`
166+
- [ ] Create PR via `gh pr create` with:
167+
- Title: `feat(Logics/Temporal/Syntax): temporal formula type`
168+
- Base branch: `refactor/proposition-lukasiewicz` (PR #635's branch) to show minimal diff
169+
- Body including: summary, dependency on PR #635, file list, AI disclosure per CONTRIBUTING.md
170+
- [ ] Verify PR appears correctly on GitHub and diff shows only the temporal additions (not the full PR #635 diff)
171+
- [ ] Record PR URL in task artifacts
172+
173+
**Timing**: 15 minutes
174+
175+
**Depends on**: 3
176+
177+
**Files to modify**:
178+
- None (git operations only)
179+
180+
**Verification**:
181+
- PR is created and visible on GitHub
182+
- PR description mentions dependency on PR #635
183+
- PR diff shows only Formula.lean, Cslib.lean changes, and references.bib additions relative to the base branch
184+
- AI disclosure is present in the PR description
185+
186+
## Testing & Validation
187+
188+
- [ ] `lake build --wfail --iofail` passes with zero warnings
189+
- [ ] `lake test` passes
190+
- [ ] `lake exe mk_all --check --module` passes
191+
- [ ] `lake exe checkInitImports` passes
192+
- [ ] `lake exe lint-style` passes
193+
- [ ] `git diff refactor/proposition-lukasiewicz --stat` shows only Formula.lean, Cslib.lean, references.bib
194+
- [ ] PR diff on GitHub matches expected scope (no extra files from fork)
195+
196+
## Artifacts & Outputs
197+
198+
- `specs/170_submit_subpr_3_1_3_2_temporal_syntax/plans/01_pr-submission-plan.md` (this plan)
199+
- PR URL on `leanprover/cslib` (created in Phase 4)
200+
- Clean branch `pr3/temporal-syntax` pushed to origin
201+
202+
## Rollback/Contingency
203+
204+
- **Branch contamination**: If the branch picks up unintended files, delete and recreate: `git branch -D pr3/temporal-syntax` and start Phase 1 over
205+
- **CI failures**: Fix issues on the branch and force-push (acceptable for pre-review PRs)
206+
- **PR #635 changes**: If PR #635 is force-pushed or rebased, rebase `pr3/temporal-syntax` on the updated branch: `git rebase refactor/proposition-lukasiewicz`
207+
- **Scope creep**: If reviewer asks for Context/BigConj/Subformulas, those are task 160 (separate PR) -- respond directing to Sub-PR 3.2

0 commit comments

Comments
 (0)