Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > algrf | Structured version Visualization version GIF version |
Description: An algorithm is a step
function 𝐹:𝑆⟶𝑆 on a state space 𝑆.
An algorithm acts on an initial state 𝐴 ∈ 𝑆 by iteratively applying
𝐹 to give 𝐴, (𝐹‘𝐴), (𝐹‘(𝐹‘𝐴)) and so
on. An algorithm is said to halt if a fixed point of 𝐹 is
reached
after a finite number of iterations.
The algorithm iterator 𝑅:ℕ0⟶𝑆 "runs" the algorithm 𝐹 so that (𝑅‘𝑘) is the state after 𝑘 iterations of 𝐹 on the initial state 𝐴. Domain and codomain of the algorithm iterator 𝑅. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
Ref | Expression |
---|---|
algrf.1 | ⊢ 𝑍 = (ℤ≥‘𝑀) |
algrf.2 | ⊢ 𝑅 = seq𝑀((𝐹 ∘ 1st ), (𝑍 × {𝐴})) |
algrf.3 | ⊢ (𝜑 → 𝑀 ∈ ℤ) |
algrf.4 | ⊢ (𝜑 → 𝐴 ∈ 𝑆) |
algrf.5 | ⊢ (𝜑 → 𝐹:𝑆⟶𝑆) |
Ref | Expression |
---|---|
algrf | ⊢ (𝜑 → 𝑅:𝑍⟶𝑆) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | algrf.1 | . . 3 ⊢ 𝑍 = (ℤ≥‘𝑀) | |
2 | algrf.3 | . . 3 ⊢ (𝜑 → 𝑀 ∈ ℤ) | |
3 | algrf.4 | . . . . 5 ⊢ (𝜑 → 𝐴 ∈ 𝑆) | |
4 | fvconst2g 6968 | . . . . 5 ⊢ ((𝐴 ∈ 𝑆 ∧ 𝑥 ∈ 𝑍) → ((𝑍 × {𝐴})‘𝑥) = 𝐴) | |
5 | 3, 4 | sylan 583 | . . . 4 ⊢ ((𝜑 ∧ 𝑥 ∈ 𝑍) → ((𝑍 × {𝐴})‘𝑥) = 𝐴) |
6 | 3 | adantr 484 | . . . 4 ⊢ ((𝜑 ∧ 𝑥 ∈ 𝑍) → 𝐴 ∈ 𝑆) |
7 | 5, 6 | eqeltrd 2833 | . . 3 ⊢ ((𝜑 ∧ 𝑥 ∈ 𝑍) → ((𝑍 × {𝐴})‘𝑥) ∈ 𝑆) |
8 | vex 3401 | . . . . 5 ⊢ 𝑥 ∈ V | |
9 | vex 3401 | . . . . 5 ⊢ 𝑦 ∈ V | |
10 | 8, 9 | algrflem 7838 | . . . 4 ⊢ (𝑥(𝐹 ∘ 1st )𝑦) = (𝐹‘𝑥) |
11 | algrf.5 | . . . . 5 ⊢ (𝜑 → 𝐹:𝑆⟶𝑆) | |
12 | simpl 486 | . . . . 5 ⊢ ((𝑥 ∈ 𝑆 ∧ 𝑦 ∈ 𝑆) → 𝑥 ∈ 𝑆) | |
13 | ffvelrn 6853 | . . . . 5 ⊢ ((𝐹:𝑆⟶𝑆 ∧ 𝑥 ∈ 𝑆) → (𝐹‘𝑥) ∈ 𝑆) | |
14 | 11, 12, 13 | syl2an 599 | . . . 4 ⊢ ((𝜑 ∧ (𝑥 ∈ 𝑆 ∧ 𝑦 ∈ 𝑆)) → (𝐹‘𝑥) ∈ 𝑆) |
15 | 10, 14 | eqeltrid 2837 | . . 3 ⊢ ((𝜑 ∧ (𝑥 ∈ 𝑆 ∧ 𝑦 ∈ 𝑆)) → (𝑥(𝐹 ∘ 1st )𝑦) ∈ 𝑆) |
16 | 1, 2, 7, 15 | seqf 13476 | . 2 ⊢ (𝜑 → seq𝑀((𝐹 ∘ 1st ), (𝑍 × {𝐴})):𝑍⟶𝑆) |
17 | algrf.2 | . . 3 ⊢ 𝑅 = seq𝑀((𝐹 ∘ 1st ), (𝑍 × {𝐴})) | |
18 | 17 | feq1i 6489 | . 2 ⊢ (𝑅:𝑍⟶𝑆 ↔ seq𝑀((𝐹 ∘ 1st ), (𝑍 × {𝐴})):𝑍⟶𝑆) |
19 | 16, 18 | sylibr 237 | 1 ⊢ (𝜑 → 𝑅:𝑍⟶𝑆) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 399 = wceq 1542 ∈ wcel 2113 {csn 4513 × cxp 5517 ∘ ccom 5523 ⟶wf 6329 ‘cfv 6333 (class class class)co 7164 1st c1st 7705 ℤcz 12055 ℤ≥cuz 12317 seqcseq 13453 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1802 ax-4 1816 ax-5 1916 ax-6 1974 ax-7 2019 ax-8 2115 ax-9 2123 ax-10 2144 ax-11 2161 ax-12 2178 ax-ext 2710 ax-sep 5164 ax-nul 5171 ax-pow 5229 ax-pr 5293 ax-un 7473 ax-cnex 10664 ax-resscn 10665 ax-1cn 10666 ax-icn 10667 ax-addcl 10668 ax-addrcl 10669 ax-mulcl 10670 ax-mulrcl 10671 ax-mulcom 10672 ax-addass 10673 ax-mulass 10674 ax-distr 10675 ax-i2m1 10676 ax-1ne0 10677 ax-1rid 10678 ax-rnegex 10679 ax-rrecex 10680 ax-cnre 10681 ax-pre-lttri 10682 ax-pre-lttrn 10683 ax-pre-ltadd 10684 ax-pre-mulgt0 10685 |
This theorem depends on definitions: df-bi 210 df-an 400 df-or 847 df-3or 1089 df-3an 1090 df-tru 1545 df-fal 1555 df-ex 1787 df-nf 1791 df-sb 2074 df-mo 2540 df-eu 2570 df-clab 2717 df-cleq 2730 df-clel 2811 df-nfc 2881 df-ne 2935 df-nel 3039 df-ral 3058 df-rex 3059 df-reu 3060 df-rab 3062 df-v 3399 df-sbc 3680 df-csb 3789 df-dif 3844 df-un 3846 df-in 3848 df-ss 3858 df-pss 3860 df-nul 4210 df-if 4412 df-pw 4487 df-sn 4514 df-pr 4516 df-tp 4518 df-op 4520 df-uni 4794 df-iun 4880 df-br 5028 df-opab 5090 df-mpt 5108 df-tr 5134 df-id 5425 df-eprel 5430 df-po 5438 df-so 5439 df-fr 5478 df-we 5480 df-xp 5525 df-rel 5526 df-cnv 5527 df-co 5528 df-dm 5529 df-rn 5530 df-res 5531 df-ima 5532 df-pred 6123 df-ord 6169 df-on 6170 df-lim 6171 df-suc 6172 df-iota 6291 df-fun 6335 df-fn 6336 df-f 6337 df-f1 6338 df-fo 6339 df-f1o 6340 df-fv 6341 df-riota 7121 df-ov 7167 df-oprab 7168 df-mpo 7169 df-om 7594 df-1st 7707 df-2nd 7708 df-wrecs 7969 df-recs 8030 df-rdg 8068 df-er 8313 df-en 8549 df-dom 8550 df-sdom 8551 df-pnf 10748 df-mnf 10749 df-xr 10750 df-ltxr 10751 df-le 10752 df-sub 10943 df-neg 10944 df-nn 11710 df-n0 11970 df-z 12056 df-uz 12318 df-fz 12975 df-seq 13454 |
This theorem is referenced by: alginv 16009 algcvg 16010 algcvga 16013 algfx 16014 eucalgcvga 16020 eucalg 16021 ovolicc2lem2 24263 ovolicc2lem3 24264 ovolicc2lem4 24265 bfplem1 35592 bfplem2 35593 |
Copyright terms: Public domain | W3C validator |