[5fdc19]: thys / Group-Ring-Module / Algebra6.thy  Maximize  Restore  History

Download this file

4561 lines (4383 with data), 284.7 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
(** Algebra6
author Hidetsune Kobayashi
Group You Santo
Department of Mathematics
Nihon University
hikoba at math.cst.nihon-u.ac.jp
May 3, 2004.
chapter 5. Modules
section 3. a module over two rings
section 4. eSum and Generators
subsection 4-1. sum up coefficients
subsection 4-2. free generators
**)
theory Algebra6
imports Algebra5
begin
constdefs
indmhom :: "[('b, 'm) RingType_scheme, ('a, 'b, 'm1) ModuleType_scheme,
('c, 'b, 'm2) ModuleType_scheme, 'a \<Rightarrow> 'c] \<Rightarrow> 'a set \<Rightarrow> 'c"
"indmhom R M N f == \<lambda>X\<in> (set_mr_cos M (ker\<^sub>M\<^sub>,\<^sub>N f)). f ( \<some> x. x \<in> X)"
syntax
"@INDMHOM"::"['a \<Rightarrow> 'b, ('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme, ('b, 'r, 'm2) ModuleType_scheme] \<Rightarrow> ('a set \<Rightarrow> 'b )"
("(4_\<^sup>\<flat>\<^sub>_ \<^sub>_\<^sub>,\<^sub>_)" [92,92,92,93]92)
translations
"f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N" == "indmhom R M N f"
lemma indmhom_someTr:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N;
X \<in> set_mr_cos M (ker\<^sub>M\<^sub>,\<^sub>N f)\<rbrakk> \<Longrightarrow> f (SOME xa. xa \<in> X) \<in> f `(carrier M)"
apply (simp add:set_mr_cos_def)
apply auto
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:submodule_def) apply (erule conjE)+
apply (simp add:asubgroup_def)
apply (thin_tac "\<forall>a\<in>carrier R. \<forall>m\<in>ker\<^sub>M\<^sub>,\<^sub>N f. a \<star>\<^sub>M m \<in> ker\<^sub>M\<^sub>,\<^sub>N f")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule b_ag_group)
apply (rule someI2_ex)
apply (simp add:ar_coset_def)
apply (frule_tac a = a in aInR_cos [of "b_ag M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply (simp add:ag_carrier_carrier [THEN sym])
apply auto
apply (simp add:ar_coset_def)
apply (frule_tac a = a and x = x in r_cosTr0 [of "b_ag M" "ker\<^sub>M\<^sub>,\<^sub>N f"],
assumption+)
apply (simp add:ag_carrier_carrier) apply assumption
apply (simp add:ag_carrier_carrier) (* ? *)
done
lemma indmhom_someTr1:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N;
m \<in> carrier M\<rbrakk> \<Longrightarrow> f (SOME xa. xa \<in> (ar_coset m M (ker\<^sub>M\<^sub>,\<^sub>N f))) = f m"
apply (rule someI2_ex)
apply (frule_tac m_in_mr_coset[of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f" "m"], assumption+)
apply (rule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply blast
apply (frule_tac x = x in x_in_mr_coset [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f" "m"],
assumption+)
apply (rule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply auto
apply (thin_tac "m +\<^sub>M h \<in> m \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (simp add:ker_def) apply (erule conjE)
apply (subst mHom_add[of "R" "M" "N" "f" "m"], assumption+)
apply (frule module_is_ag [of "R" "N"], assumption+)
apply simp
apply (frule mHom_mem [of "R" "M" "N" "f" "m"], assumption+)
apply (simp add:ag_r_zero)
done
lemma indmhom_someTr2:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N; submodule R M H; m \<in> carrier M; H \<subseteq> ker\<^sub>M\<^sub>,\<^sub>N f \<rbrakk> \<Longrightarrow> f (SOME xa. xa \<in> m \<uplus>\<^sub>M H) = f m"
apply (rule someI2_ex)
apply (frule_tac m_in_mr_coset[of "R" "M" "H" "m"], assumption+)
apply blast
apply (frule_tac x = x in x_in_mr_coset [of "R" "M" "H" "m"], assumption+)
apply (subgoal_tac "\<forall>h\<in>H. m +\<^sub>M h = x \<longrightarrow> f x = f m") apply blast
apply (thin_tac "\<exists>h\<in>H. m +\<^sub>M h = x")
apply (rule ballI) apply (rule impI)
apply (subgoal_tac "h \<in> carrier M") apply (rotate_tac -1) apply (frule sym)
apply (thin_tac "m +\<^sub>M h = x") apply simp
apply (subst mHom_add[of "R" "M" "N" "f" "m"], assumption+)
apply (frule module_is_ag [of "R" "N"], assumption+)
apply (frule mHom_mem [of "R" "M" "N" "f" "m"], assumption+)
apply (frule_tac A = H and B = "ker\<^sub>M\<^sub>,\<^sub>N f" and c = h in subsetD, assumption+)
apply (simp add:ker_def)
apply (simp add:ag_r_zero) apply (simp add:ker_def)
apply (frule_tac A = H and B = "{a. a \<in> carrier M \<and> f a = 0\<^sub>N}" and c = h in
subsetD, assumption+) apply simp
done
lemma indmhomTr1:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N;
m \<in> carrier M\<rbrakk> \<Longrightarrow> (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) (m \<uplus>\<^sub>M (ker\<^sub>M\<^sub>,\<^sub>N f)) = f m"
apply (simp add:indmhom_def)
apply (subgoal_tac "m \<uplus>\<^sub>M (ker\<^sub>M\<^sub>,\<^sub>N f) \<in> set_mr_cos M (ker\<^sub>M\<^sub>,\<^sub>N f)")
apply simp
apply (rule indmhom_someTr1, assumption+)
apply (rule set_mr_cos_mem, assumption+)
apply (rule mker_submodule, assumption+)
done
lemma indmhomTr2:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk>
\<Longrightarrow> (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) \<in> set_mr_cos M (ker\<^sub>M\<^sub>,\<^sub>N f) \<rightarrow> carrier N"
apply (rule univar_func_test)
apply (rule ballI)
apply (simp add:set_mr_cos_def)
apply auto
apply (frule_tac m = a in indmhomTr1 [of "R" "M" "N" "f"], assumption+)
apply (simp add:mHom_mem)
done
lemma indmhom:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk>
\<Longrightarrow> (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) \<in> mHom R (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)) N"
apply (simp add:mHom_def [of "R" "M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)" "N"])
apply (rule conjI)
apply (simp add:aHom_def)
apply (rule conjI)
apply (rule univar_func_test) apply (rule ballI)
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. x = a \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f \<longrightarrow>
(f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) x \<in> carrier N")
apply blast apply (thin_tac "\<exists>a\<in>carrier M. x = a \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (rule ballI) apply (rule impI)
apply simp apply (simp add:indmhomTr1 mHom_mem)
apply (rule conjI)
apply (simp add:indmhom_def extensional_def)
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr)
apply (rule ballI)+
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr)
apply (subst qmodule_def) apply simp
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>m\<in>carrier M. \<forall>n\<in>carrier M. a = m \<uplus>\<^sub>M (ker\<^sub>M\<^sub>,\<^sub>N f) \<and>
b = n \<uplus>\<^sub>M (ker\<^sub>M\<^sub>,\<^sub>N f) \<longrightarrow> ((f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) (mr_cospOp M (ker\<^sub>M\<^sub>,\<^sub>N f) a b) =
(f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) a +\<^sub>N ((f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N) b))")
apply blast
apply (thin_tac "\<exists>aa\<in>carrier M. a = aa \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (thin_tac "\<exists>a\<in>carrier M. b = a \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (rule ballI)+ apply (rule impI) apply simp
apply (thin_tac "a = m \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f \<and> b = n \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (subst mr_cospOpTr [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac x = m and y = n in ag_pOp_closed [of "M"], assumption+)
apply (subst indmhomTr1, assumption+)+
apply (simp add:mHom_add)
apply (rule ballI)+
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr) apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply auto
apply (subst mr_cos_sprodTr, assumption+)
apply (rename_tac a m)
apply (frule_tac a = a and m = m in sprod_mem [of "R" "M"], assumption+)
apply (subst indmhomTr1, assumption+)+
apply (simp add:mHom_lin)
done
lemma indmhom_injec:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk> \<Longrightarrow>
injec\<^sub>(M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))\<^sub>,\<^sub>N (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N)"
apply (simp add:injec_def)
apply (frule indmhom [of "R" "M" "N" "f"], assumption+)
apply (rule conjI)
apply (simp add:mHom_def)
apply (simp add:ker_def [of _ _ "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N"])
apply (simp add:qmodule_def) apply (fold qmodule_def)
apply (rule equalityI)
apply (rule subsetI) apply (simp add:CollectI) apply (erule conjE)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. x = a \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f \<longrightarrow> x = ker\<^sub>M\<^sub>,\<^sub>N f")
apply blast
apply (thin_tac "\<exists>a\<in>carrier M. x = a \<uplus>\<^sub>M ker\<^sub>M\<^sub>,\<^sub>N f")
apply (rule ballI) apply (rule impI)
apply simp
apply (simp add:indmhomTr1)
apply (subgoal_tac "a \<in> ker\<^sub>M\<^sub>,\<^sub>N f")
apply (rule_tac h1 = a in mr_cos_h_stable [THEN sym, of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"],
assumption+)
apply (simp add:mker_submodule) apply assumption
apply (simp add:ker_def)
apply (rule subsetI) apply (simp add:CollectI)
apply (rule conjI)
apply (simp add:set_mr_cos_def)
apply (frule mr_cos_oneTr [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply (simp add:mker_submodule)
apply (frule module_inc_zero [of "R" "M"], assumption+)
apply blast
apply (subst mr_cos_oneTr [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply (simp add:mker_submodule)
apply (subst indmhomTr1, assumption+)
apply (simp add:module_inc_zero)
apply (simp add:mHom_0)
done
lemma indmhom_surjec1:"\<lbrakk>ring R; R module M; R module N; surjec\<^sub>M\<^sub>,\<^sub>N f;
f \<in> mHom R M N\<rbrakk> \<Longrightarrow> surjec\<^sub>(M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))\<^sub>,\<^sub>N (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N)"
apply (simp add:surjec_def)
apply (frule indmhom [of "R" "M" "N" "f"], assumption+)
apply (rule conjI)
apply (simp add:mHom_def)
apply (rule surj_to_test)
apply (simp add:mHom_def aHom_def)
apply (rule ballI)
apply (erule conjE)
apply (subgoal_tac "b \<in> f ` (carrier M)")
apply (simp add:image_def)
prefer 2 apply (simp add:surj_to_def)
apply auto
apply (frule_tac m = x in indmhomTr1 [of "R" "M" "N" "f"], assumption+)
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr)
apply (frule_tac m = x in set_mr_cos_mem [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply auto
done
lemma module_homTr:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk> \<Longrightarrow>
f \<in> mHom R M (mimg\<^sub>R \<^sub>M\<^sub>,\<^sub>N f)"
apply (subst mHom_def) apply (simp add:CollectI)
apply (rule conjI)
apply (simp add:aHom_def)
apply (rule conjI)
apply (simp add:mimg_def mdl_def)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:image_def) apply blast
apply (rule conjI)
apply (simp add:mHom_def aHom_def extensional_def)
apply (rule ballI)+
apply (simp add:mimg_def mdl_def)
apply (simp add:mHom_add)
apply (rule ballI)+
apply (simp add:mimg_def mdl_def)
apply (simp add:mHom_lin)
done
lemma module_homTr1:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk> \<Longrightarrow>
(mimg\<^sub>R \<^sub>(M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))\<^sub>,\<^sub>N (f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N )) = mimg\<^sub>R \<^sub>M\<^sub>,\<^sub>N f"
apply (simp add:mimg_def mdl_def)
apply (simp add:qmodule_def)
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:image_def set_mr_cos_def)
apply auto
apply (subst indmhomTr1, assumption+) apply blast
apply (simp add:image_def set_mr_cos_def)
apply (frule_tac m1 = xa in indmhomTr1 [THEN sym, of "R" "M" "N" "f"],
assumption+)
apply auto
done
lemma module_Homth_1:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N\<rbrakk> \<Longrightarrow>
M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f) \<cong>\<^sub>R mimg\<^sub>R \<^sub>M\<^sub>,\<^sub>N f"
apply (simp add:misomorphic_def)
apply (subgoal_tac "bijec\<^sub>(M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))\<^sub>,\<^sub>(mimg\<^sub>R \<^sub>M\<^sub>,\<^sub>N f)
(indmhom R M N f)")
apply (subgoal_tac "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N \<in> mHom R (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)) (mimg\<^sub>R \<^sub>M\<^sub>,\<^sub>N f)")
apply auto
apply (frule indmhom [of "R" "M" "N" "f"], assumption+)
apply (subgoal_tac "R module (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))")
apply (frule module_homTr [of "R" "M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)" "N" "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N"], assumption+)
apply (simp add:module_homTr1)
apply (rule qmodule_module, assumption+)
apply (simp add:mker_submodule)
apply (frule indmhom [of "R" "M" "N" "f"], assumption+)
apply (subgoal_tac "R module (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f))")
apply (frule module_homTr [of "R" "M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)" "N" "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N"], assumption+)
apply (simp add:module_homTr1)
apply (thin_tac "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N \<in> mHom R (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)) N")
apply (simp add:bijec_def)
apply (rule conjI)
apply (simp add:injec_def)
apply (rule conjI)
apply (simp add:mHom_def)
apply (frule indmhom_injec [of "R" "M" "N" "f"], assumption+)
apply (simp add:injec_def)
apply (simp add:ker_def) apply (simp add:mimg_def mdl_def)
apply (simp add:surjec_def)
apply (rule conjI) apply (simp add:mHom_def)
apply (frule mker_submodule [of "R" "M" "N" "f"], assumption+)
apply (simp add:qmodule_carr)
apply (simp add:mimg_def mdl_def) apply (fold mdl_def)
apply (rule surj_to_test)
apply (thin_tac "f \<in> mHom R M N")
apply (simp add:mHom_def aHom_def) apply (frule conj_1)
apply (simp add:qmodule_carr mdl_def)
prefer 2 apply (rule qmodule_module, assumption+)
apply (simp add:mker_submodule)
apply (rule ballI)
apply (thin_tac "f\<^sup>\<flat>\<^sub>R \<^sub>M\<^sub>,\<^sub>N \<in> mHom R (M /\<^sub>m (ker\<^sub>M\<^sub>,\<^sub>N f)) (mdl N (f ` carrier M))")
apply (simp add:image_def) apply auto
apply (frule_tac m = x in indmhomTr1 [of "R" "M" "N" "f"], assumption+)
apply (frule_tac m = x in set_mr_cos_mem [of "R" "M" "ker\<^sub>M\<^sub>,\<^sub>N f"], assumption+)
apply auto
done
constdefs
mpj :: "[('a, 'r, 'm) ModuleType_scheme, 'a set] \<Rightarrow> ('a => 'a set)"
"mpj M H == \<lambda>x\<in>carrier M. x \<uplus>\<^sub>M H"
lemma mpj_mHom:"\<lbrakk>ring R; R module M; submodule R M H\<rbrakk> \<Longrightarrow>
mpj M H \<in> mHom R M (M /\<^sub>m H)"
apply (simp add:mHom_def)
apply (rule conjI)
apply (simp add:aHom_def)
apply (rule conjI)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:mpj_def qmodule_carr)
apply (simp add:set_mr_cos_mem)
apply (rule conjI)
apply (simp add:mpj_def extensional_def)
apply (rule ballI)+
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac x = a and y = b in ag_pOp_closed [of "M"], assumption+)
apply (simp add:mpj_def)
apply (simp add:qmodule_def)
apply (subst mr_cospOpTr, assumption+) apply simp
apply (rule ballI)+
apply (simp add:mpj_def qmodule_def)
apply (simp add:sprod_mem)
apply (simp add:mr_cos_sprodTr)
done
lemma mpj_mem:"\<lbrakk>ring R; R module M; submodule R M H; m \<in> carrier M\<rbrakk> \<Longrightarrow>
mpj M H m \<in> carrier (M /\<^sub>m H)"
apply (frule mpj_mHom[of "R" "M" "H"], assumption+)
apply (rule mHom_mem [of "R" "M" "M /\<^sub>m H" "mpj M H" "m"], assumption+)
apply (simp add:qmodule_module) apply assumption+
done
lemma mpj_surjec:"\<lbrakk>ring R; R module M; submodule R M H\<rbrakk> \<Longrightarrow>
surjec\<^sub>M\<^sub>,\<^sub>(M /\<^sub>m H) (mpj M H)"
apply (simp add:surjec_def)
apply (frule mpj_mHom [of "R" "M" "H"])
apply assumption+
apply (simp add:mHom_def) apply (erule conjE)
apply (thin_tac "\<forall>a\<in>carrier R. \<forall>m\<in>carrier M. mpj M H ( a \<star>\<^sub>M m) = a \<star>\<^sub>(M /\<^sub>m H) (mpj M H m)")
apply (rule surj_to_test)
apply (simp add:aHom_def)
apply (rule ballI)
apply (thin_tac "mpj M H \<in> aHom M (M /\<^sub>m H)")
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. b = a \<uplus>\<^sub>M H \<longrightarrow> (\<exists>a\<in>carrier M. mpj M H a = b)")
apply blast apply (thin_tac "\<exists>a\<in>carrier M. b = a \<uplus>\<^sub>M H")
apply (rule ballI) apply (rule impI) apply simp
apply (simp add:mpj_def) apply blast
done
lemma mpj_0:"\<lbrakk>ring R; R module M; submodule R M H; h \<in> H\<rbrakk> \<Longrightarrow>
mpj M H h = 0\<^sub>(M /\<^sub>m H)"
apply (simp add:mpj_def)
apply (simp add:submodule_def) apply (erule conjE)+
apply (simp add:subsetD)
apply (simp add:qmodule_def)
apply (frule_tac m = h in m_in_mr_coset [of "R" "M" "H"], assumption+)
apply (simp add:submodule_def)
apply (simp add:subsetD)
apply (rule mr_cos_h_stable[THEN sym], assumption+)
apply (simp add:submodule_def)
apply assumption
done
lemma mker_of_mpj:"\<lbrakk>ring R; R module M; submodule R M H\<rbrakk> \<Longrightarrow>
ker\<^sub>M\<^sub>,\<^sub>(M /\<^sub>m H) (mpj M H) = H"
apply (simp add:ker_def)
apply (simp add:mpj_def)
apply (rule equalityI)
apply (rule subsetI) apply (simp add:CollectI)
apply (erule conjE) apply simp
apply (simp add:qmodule_def)
apply (frule_tac m = x in m_in_mr_coset [of "R" "M" "H"], assumption+)
apply simp
apply (rule subsetI)
apply (simp add:CollectI)
apply (simp add:submodule_def) apply (erule conjE)+
apply (rule conjI) apply (rule impI)
apply (simp add:qmodule_def)
apply (rule mr_cos_h_stable[THEN sym], assumption+)
apply (simp add:submodule_def) apply assumption
apply (simp add:subsetD)
done
lemma indmhom1:"\<lbrakk>ring R; R module M; submodule R M H; R module N; f \<in> mHom R M N; H \<subseteq> ker\<^sub>M\<^sub>,\<^sub>N f\<rbrakk> \<Longrightarrow> \<exists>!g. g \<in> (mHom R (M /\<^sub>m H) N) \<and> (compose (carrier M) g (mpj M H)) = f"
apply (rule ex_ex1I)
prefer 2
apply (rename_tac g h)
apply (erule conjE)+
apply (frule qmodule_module[of "R" "M" "H"], assumption+)
apply (rule_tac f = g and g = h in mHom_eq[of "R" "M /\<^sub>m H" "N"], assumption+)
apply (rule ballI)
apply (simp add:qmodule_def) apply (fold qmodule_def)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. m = a \<uplus>\<^sub>M H \<longrightarrow> g m = h m") apply blast
apply (thin_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H") apply (rule ballI)
apply (rule impI)
apply (subgoal_tac "mpj M H a = a \<uplus>\<^sub>M H") prefer 2 apply (simp add:mpj_def)
apply (rotate_tac -1) apply (frule sym) apply (thin_tac "mpj M H a = a \<uplus>\<^sub>M H")
apply simp
apply (subgoal_tac "compose (carrier M) g (mpj M H) a = f a")
prefer 2 apply simp apply (thin_tac "compose (carrier M) g (mpj M H) = f")
apply (subgoal_tac "compose (carrier M) h (mpj M H) a = f a")
prefer 2 apply simp apply (thin_tac "compose (carrier M) h (mpj M H) = f")
apply (simp add:compose_def)
apply (subgoal_tac "(\<lambda>X\<in>set_mr_cos M H. f (SOME x. x \<in> X)) \<in> mHom R (M /\<^sub>m H) N \<and> compose (carrier M) (\<lambda>X\<in>set_mr_cos M H. f (SOME x. x \<in> X)) (mpj M H) = f")
apply blast
apply (rule conjI)
apply (rule mHom_test, assumption+)
apply (simp add:qmodule_module) apply assumption+
apply (rule conjI)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:qmodule_def) apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. x = a \<uplus>\<^sub>M H \<longrightarrow> f (SOME xa. xa \<in> x) \<in> carrier N") apply blast apply (thin_tac "\<exists>a\<in>carrier M. x = a \<uplus>\<^sub>M H")
apply (rule ballI) apply (rule impI) apply simp
apply (simp add:indmhom_someTr2) apply (simp add:mHom_mem)
apply (rule conjI)
apply (simp add:qmodule_def)
apply (rule conjI) apply (rule ballI)+
apply (simp add:qmodule_def)
apply (subgoal_tac "mr_cospOp M H m n \<in> set_mr_cos M H")
apply (simp add:set_mr_cos_def) apply (thin_tac "\<exists>a\<in>carrier M. mr_cospOp M H m n = a \<uplus>\<^sub>M H")
apply (subgoal_tac "\<forall>a\<in>carrier M. \<forall>b\<in>carrier M. m = a \<uplus>\<^sub>M H \<and> n = b \<uplus>\<^sub>M H \<longrightarrow> f (SOME x. x \<in> mr_cospOp M H m n) = f (SOME x. x \<in> m) +\<^sub>N (f (SOME x. x \<in> n))") apply blast apply (thin_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H")
apply (thin_tac "\<exists>a\<in>carrier M. n = a \<uplus>\<^sub>M H") apply (rule ballI)+
apply (rule impI) apply (erule conjE) apply simp
apply (simp add:mr_cospOpTr [of "R" "M" "H"])
apply (simp add:indmhom_someTr2)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac x = a and y = b in ag_pOp_closed[of "M"], assumption+)
apply (simp add:indmhom_someTr2) apply (simp add:mHom_add)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. \<forall>b\<in>carrier M. m = a \<uplus>\<^sub>M H \<and> n = b \<uplus>\<^sub>M H \<longrightarrow> (\<exists>a\<in>carrier M. mr_cospOp M H m n = a \<uplus>\<^sub>M H)") apply blast
apply (thin_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H") apply (thin_tac "\<exists>a\<in>carrier M. n = a \<uplus>\<^sub>M H") apply (rule ballI)+ apply (rule impI) apply (erule conjE)
apply simp apply (simp add:mr_cospOpTr [of "R" "M" "H"])
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac x = a and y = b in ag_pOp_closed[of "M"], assumption+)
apply blast
apply (rule ballI)+
apply (simp add:qmodule_def)
apply (frule_tac a = a and X = m in mr_cos_sprod_mem [of "R" "M" "H"], assumption+) apply simp
apply (subgoal_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H")
prefer 2 apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>n\<in>carrier M. m = n \<uplus>\<^sub>M H \<longrightarrow> f (SOME x. x \<in> mr_cos_sprod M H a m) = a \<star>\<^sub>N (f (SOME x. x \<in> m))")
apply blast apply (thin_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H") apply (rule ballI)
apply (rule impI) apply simp
apply (simp add:mr_cos_sprodTr)
apply (frule_tac a = a and m = n in sprod_mem[of "R" "M"], assumption+)
apply (simp add:indmhom_someTr2)
apply (simp add:mHom_lin)
apply (subgoal_tac "f \<in> carrier M \<rightarrow> carrier N \<and> f \<in> extensional (carrier M)")
prefer 2 apply (simp add:mHom_def aHom_def) apply (erule conjE)
apply (subgoal_tac "compose (carrier M) (\<lambda>X\<in>set_mr_cos M H. f (SOME x. x \<in> X)) (mpj M H) \<in> carrier M \<rightarrow> carrier N")
apply (rule_tac f = "compose (carrier M) (\<lambda>X\<in>set_mr_cos M H. f (SOME x. x \<in> X)) (mpj M H)" and A = "carrier M" and g = f in funcset_eq)
apply (simp add:compose_def restrict_def extensional_def) apply assumption
apply (rule ballI) apply (simp add:compose_def)
apply (subgoal_tac "mpj M H x \<in> set_mr_cos M H") apply simp
prefer 2 apply (simp add:mpj_def set_mr_cos_def) apply blast
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>a\<in>carrier M. mpj M H x = a \<uplus>\<^sub>M H \<longrightarrow> f (SOME xa. xa \<in> mpj M H x) = f x") apply blast apply (thin_tac "\<exists>a\<in>carrier M. mpj M H x = a \<uplus>\<^sub>M H")
apply (rule ballI) apply (rule impI) apply simp
apply (frule_tac m = a in indmhom_someTr2[of "R" "M" "N" "f" "H"], assumption+) apply simp apply (thin_tac "f (SOME xa. xa \<in> a \<uplus>\<^sub>M H) = f a")
apply (thin_tac "(\<lambda>x\<in>carrier M. if \<exists>a\<in>carrier M. mpj M H x = a \<uplus>\<^sub>M H then f (SOME xa. xa \<in> mpj M H x) else arbitrary) \<in> carrier M \<rightarrow> carrier N")
apply (simp add:mpj_def)
apply (frule_tac m = x in m_in_mr_coset[of "R" "M" "H"], assumption+)
apply simp apply (thin_tac "x \<uplus>\<^sub>M H = a \<uplus>\<^sub>M H")
apply (frule_tac m = a and x = x in x_in_mr_coset[of "R" "M" "H"], assumption+)
apply (subgoal_tac "\<forall>h\<in>H. a +\<^sub>M h = x \<longrightarrow> f a = f x") apply blast
apply (thin_tac "\<exists>h\<in>H. a +\<^sub>M h = x") apply (rule ballI) apply (rule impI)
apply (frule sym) apply (thin_tac "a +\<^sub>M h = x") apply simp
apply (subgoal_tac "h \<in> carrier M")
apply (simp add:mHom_add) apply (frule_tac A = H and B = " ker\<^sub>M\<^sub>,\<^sub>N f" and c = h in subsetD, assumption+) apply (simp add:ker_def)
apply (frule_tac m = a in mHom_mem[of "R" "M" "N" "f"], assumption+)
apply (frule module_is_ag [of "R" "N"], assumption+) apply (simp add:ag_r_zero)
apply (frule_tac A = H and B = "ker\<^sub>M\<^sub>,\<^sub>N f" and c = h in subsetD, assumption+)
apply (simp add:ker_def)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:compose_def) apply (subgoal_tac "mpj M H x \<in> set_mr_cos M H")
apply simp apply (simp add:mpj_def)
apply (simp add:indmhom_someTr2[of "R" "M" "N" "f" "H"]) apply (simp add:funcset_mem)
apply (simp add:mpj_def set_mr_cos_def) apply blast
done
constdefs
mQmp :: "[('a, 'r, 'm) ModuleType_scheme, 'a set, 'a set] \<Rightarrow>
('a set \<Rightarrow> 'a set)"
"mQmp M H N == \<lambda>X\<in> set_mr_cos M H. {z. \<exists> x \<in> X. \<exists> y \<in> N. (y +\<^sub>M x = z)}"
(* H \<subseteq> N *)
syntax
"@MQP" :: "[('a, 'b) ModuleType, 'a set, 'a set] \<Rightarrow> ('a set \<Rightarrow> 'a set)"
("(3Mqp\<^sub>_\<^sub>'/'\<^sub>_\<^sub>,\<^sub>_)" [82,82,83]82)
translations
"Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N" == "mQmp M H N"
(* "\<lbrakk> R Module M; H \<subseteq> N \<rbrakk> \<Longrightarrow> Mqp\<^sub>M \<^sub>/\<^sub>m \<^sub>H\<^sub>,\<^sub>N \<in> rHom (M /\<^sub>m H) (M /\<^sub>m N)" *)
lemma mQmpTr0: "\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N;
m \<in> carrier M\<rbrakk> \<Longrightarrow> mQmp M H N (m \<uplus>\<^sub>M H) = m \<uplus>\<^sub>M N"
apply (frule set_mr_cos_mem [of "R" "M" "H" "m"], assumption+)
apply (simp add:mQmp_def)
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>xa\<in>m \<uplus>\<^sub>M H. \<forall>y\<in>N. y +\<^sub>M xa = x \<longrightarrow> x \<in> m \<uplus>\<^sub>M N")
apply blast apply (thin_tac "\<exists>xa\<in>m \<uplus>\<^sub>M H. \<exists>y\<in>N. y +\<^sub>M xa = x")
apply (rule ballI)+ apply (rule impI)
apply (frule_tac x = xa in x_in_mr_coset [of "R" "M" "H" "m"], assumption+)
apply (subgoal_tac "\<forall>h\<in>H. m +\<^sub>M h = xa \<longrightarrow> x \<in> m \<uplus>\<^sub>M N")
apply blast apply (thin_tac "\<exists>h\<in>H. m +\<^sub>M h = xa")
apply (rule ballI) apply (rule impI) apply (frule sym)
apply (thin_tac "y +\<^sub>M xa = x") apply simp apply (thin_tac "x = y +\<^sub>M xa")
apply (frule sym) apply (thin_tac "m +\<^sub>M h = xa")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_pOp_commute, assumption+)
apply (simp add:submodule_def [of "R" "M" "N"]) apply (erule conjE)+
apply (rule subsetD, assumption+) apply simp
apply (rule_tac x = m and y = h in ag_pOp_closed [of "M"], assumption+)
apply (simp add:submodule_def [of "R" "M" "H"]) apply (erule conjE)+
apply (rule subsetD, assumption+) apply simp
apply (subst ag_pOp_assoc, assumption+)
apply (simp add:submodule_def [of "R" "M" "H"]) apply (erule conjE)+
apply (simp add:subsetD)
apply (simp add:submodule_def [of "R" "M" "N"]) apply (erule conjE)+
apply (simp add:subsetD)
apply (simp add:submodule_def [of "R" "M" "N"]) apply (erule conjE)+
apply (frule_tac c = h in subsetD [of "H" "N"], assumption+)
apply (frule_tac x = h and y = y in asubg_pOp_closed [of "M" "N"],
assumption+)
apply (frule_tac h = "h +\<^sub>M y" in mr_cos_h_stable1 [of "R" "M" "N" "m"],
assumption+)
apply (simp add:submodule_def) apply assumption+
apply (rotate_tac -1) apply (frule sym)
apply (thin_tac "(m +\<^sub>M ( h +\<^sub>M y)) \<uplus>\<^sub>M N = m \<uplus>\<^sub>M N")
apply simp
apply (rule m_in_mr_coset [of "R" "M" "N"], assumption+)
apply (simp add:submodule_def)
apply (rule ag_pOp_closed, assumption+)
apply (simp add:subsetD)
apply (rule subsetI)
apply (simp add:mr_coset_def)
apply (subgoal_tac "N\<^sub>(b_ag M) m = m \<uplus>\<^sub>M N")
apply (subgoal_tac "H\<^sub>(b_ag M) m = m \<uplus>\<^sub>M H")
apply (thin_tac " N\<^sub>(b_ag M) m = m \<uplus>\<^sub>M N")
apply (thin_tac " H\<^sub>(b_ag M) m = m \<uplus>\<^sub>M H")
prefer 2 apply (simp only:ar_coset_def [of "m" "M" "H"])
prefer 2 apply (simp only:ar_coset_def [of "m" "M" "N"])
apply (frule_tac x = x in x_in_mr_coset [of "R" "M" "N" "m"], assumption+)
apply (frule m_in_mr_coset [of "R" "M" "H" "m"], assumption+)
apply auto
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_pOp_commute [of M m], assumption+)
apply (simp add:submodule_def [of _ _ "N"])
apply auto
done
(* show mQmp M H N is a welldefined map from M/H to M/N. step2 *)
lemma mQmpTr1:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N;
m \<in> carrier M; n \<in> carrier M; m \<uplus>\<^sub>M H = n \<uplus>\<^sub>M H\<rbrakk> \<Longrightarrow> m \<uplus>\<^sub>M N = n \<uplus>\<^sub>M N"
apply (frule_tac m_in_mr_coset [of "R" "M" "H" "m"], assumption+)
apply simp
apply (frule_tac x_in_mr_coset [of "R" "M" "H" "n" "m"], assumption+)
apply (auto del:equalityI)
apply (frule_tac c = h in subsetD [of "H" "N"], assumption+)
apply (rule mr_cos_h_stable1[of "R" "M" "N" "n"], assumption+)
done
lemma mQmpTr2:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N ; X \<in> carrier (M /\<^sub>m H)\<rbrakk> \<Longrightarrow> (mQmp M H N) X \<in> carrier (M /\<^sub>m N)"
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply auto
apply (frule_tac m = a in mQmpTr0 [of "R" "M" "H" "N"], assumption+)
apply auto
done
lemma mQmpTr2_1:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N \<rbrakk>
\<Longrightarrow> mQmp M H N \<in> carrier (M /\<^sub>m H) \<rightarrow> carrier (M /\<^sub>m N)"
apply (simp add:Pi_def)
apply (auto del:equalityI)
apply (simp add:mQmpTr2 [of "R" "M" "H" "N" _])
done
lemma mQmpTr3:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N ;
X \<in> carrier (M /\<^sub>m H); Y \<in> carrier (M /\<^sub>m H)\<rbrakk> \<Longrightarrow> (mQmp M H N) (mr_cospOp M H X Y) = mr_cospOp M N ((mQmp M H N) X) ((mQmp M H N) Y)"
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply (auto del:equalityI)
apply (subst mr_cospOpTr, assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac x = a and y = aa in ag_pOp_closed, assumption+)
apply (subst mQmpTr0, assumption+)+
apply (subst mr_cospOpTr, assumption+)
apply simp
done
lemma mQmpTr4:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N;
a \<in> N\<rbrakk> \<Longrightarrow> mr_coset a (mdl M N) H = mr_coset a M H"
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule b_ag_group)
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule asubg_nsubg [of "M" "H"], assumption+)
apply (frule asubg_nsubg [of "M" "N"], assumption+)
apply (simp add:mr_coset_def ar_coset_def)
apply (simp add:asubgroup_def)
apply (frule nsubg_in_subg [of "b_ag M" "H" "N"], assumption+)
apply (simp add:nmlSubgTr0) apply (simp add:r_coset_def)
apply (simp add:mdl_def b_ag_def)
done
lemma mQmp_mHom: "\<lbrakk>ring R; R module M; submodule R M H; submodule R M N;
H \<subseteq> N\<rbrakk> \<Longrightarrow> (Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N) \<in> mHom R (M /\<^sub>m H) (M /\<^sub>m N)"
apply (simp add:mHom_def)
apply (rule conjI)
apply (simp add:aHom_def)
apply (simp add:mQmpTr2_1)
apply (rule conjI)
apply (simp add:mQmp_def extensional_def qmodule_def)
apply (rule ballI)+
apply (frule_tac X1 = a and Y1 = b in mQmpTr3 [THEN sym, of "R" "M" "H" "N"],
assumption+)
apply (simp add:qmodule_def)
apply (rule ballI)+
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>n\<in>carrier M. m = n \<uplus>\<^sub>M H \<longrightarrow> ((Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N) (mr_cos_sprod M H a m) = mr_cos_sprod M N a ((Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N) m))")
apply blast apply (thin_tac "\<exists>a\<in>carrier M. m = a \<uplus>\<^sub>M H")
apply (rule ballI) apply (rule impI) apply simp
apply (subst mr_cos_sprodTr, assumption+)
apply (frule_tac a = a and m = n in sprod_mem [of "R" "M"], assumption+)
apply (simp add:mQmpTr0)
apply (subst mr_cos_sprodTr, assumption+)
apply simp
done
lemma Mqp_surjec: "\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N\<rbrakk> \<Longrightarrow> surjec\<^sub>(M /\<^sub>m H)\<^sub>,\<^sub>(M /\<^sub>m N) (Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N)"
apply (simp add:surjec_def)
apply (frule mQmp_mHom [of "R" "M" "H" "N"], assumption+)
apply (rule conjI)
apply (simp add:mHom_def)
apply (rule surj_to_test)
apply (simp add:mHom_def aHom_def)
apply (rule ballI)
apply (thin_tac "Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N \<in> mHom R (M /\<^sub>m H) (M /\<^sub>m N)")
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply auto
apply (frule_tac m = a in mQmpTr0 [of "R" "M" "H" "N"], assumption+)
apply auto
done
lemma kerQmp: "\<lbrakk>ring R; R module M; submodule R M H; submodule R M N; H \<subseteq> N\<rbrakk>
\<Longrightarrow> ker\<^sub>(M /\<^sub>m H)\<^sub>,\<^sub>(M /\<^sub>m N) (Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N) = carrier ((mdl M N) /\<^sub>m H)"
apply (simp add:ker_def)
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:CollectI) apply (erule conjE)
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def [of "mdl M N" "H"])
apply (simp add:set_mr_cos_def)
apply (subgoal_tac "\<forall>b\<in>carrier M. x = b \<uplus>\<^sub>M H \<longrightarrow> ( \<exists>a\<in>carrier (mdl M N). x = a \<uplus>\<^sub>(mdl M N) H)")
apply blast
apply (thin_tac "\<exists>a\<in>carrier M. x = a \<uplus>\<^sub>M H")
apply (rule ballI) apply (rule impI)
apply (frule_tac m = b in mQmpTr0 [of "R" "M" "H" "N"], assumption+)
apply simp
apply (frule_tac m = b in m_in_mr_coset [of "R" "M" "N"], assumption+)
apply (subgoal_tac "carrier (mdl M N) = N") prefer 2 apply (simp add:mdl_def)
apply simp
apply (frule mQmpTr4 [THEN sym, of "R" "M" "H" "N"], assumption+)
apply (simp add:mr_coset_def)
apply blast
apply (rule subsetI)
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def [of "mdl M N" "H"])
apply (subgoal_tac "\<forall>a\<in>carrier (mdl M N). x = a \<uplus>\<^sub>(mdl M N) H \<longrightarrow>
x \<in> set_mr_cos M H \<and> (Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N) x = N")
apply blast
apply (thin_tac "\<exists>a\<in>carrier (mdl M N). x = a \<uplus>\<^sub>(mdl M N) H")
apply (rule ballI) apply (rule impI)
apply (frule_tac a = a in mQmpTr4 [of "R" "M" "H" "N"], assumption+)
apply (simp add:mdl_def) apply (simp add:mr_coset_def)
apply (thin_tac "a \<uplus>\<^sub>(mdl M N) H = a \<uplus>\<^sub>M H")
apply (simp add:mdl_def)
apply (subgoal_tac "a \<in> carrier M")
apply (simp add:set_mr_cos_mem) apply (simp add:mQmpTr0)
apply (simp add:mr_cos_h_stable [THEN sym])
apply (simp add:submodule_def [of _ _ "N"]) apply (erule conjE)+
apply (simp add:subsetD)
done
lemma misom2Tr:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N;
H \<subseteq> N\<rbrakk> \<Longrightarrow> (M /\<^sub>m H) /\<^sub>m (carrier ((mdl M N) /\<^sub>m H)) \<cong>\<^sub>R (M /\<^sub>m N)"
apply (frule mQmp_mHom [of "R" "M" "H" "N"], assumption+)
apply (frule qmodule_module [of "R" "M" "H"], assumption+)
apply (frule qmodule_module [of "R" "M" "N"], assumption+)
apply (frule indmhom [of "R" "M /\<^sub>m H" "M /\<^sub>m N" "Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N"], assumption+)
apply (simp add:kerQmp)
apply (subgoal_tac "bijec\<^sub>((M /\<^sub>m H) /\<^sub>m (carrier((mdl M N) /\<^sub>m H)))\<^sub>,\<^sub>(M /\<^sub>m N)
(indmhom R (M /\<^sub>m H) (M /\<^sub>m N) (mQmp M H N))")
apply (simp add:misomorphic_def) apply blast
apply (simp add:bijec_def)
apply (rule conjI)
apply (simp add:kerQmp [THEN sym])
apply (rule indmhom_injec [of "R" "M /\<^sub>m H" "M /\<^sub>m N" "Mqp\<^sub>M\<^sub>/\<^sub>H\<^sub>,\<^sub>N"], assumption+)
apply (frule Mqp_surjec [of "R" "M" "H" "N"], assumption+)
apply (simp add:kerQmp [THEN sym])
apply (rule indmhom_surjec1, assumption+)
done
lemma eq_class_of_Submodule:"\<lbrakk>ring R; R module M; submodule R M H;
submodule R M N; H \<subseteq> N\<rbrakk> \<Longrightarrow> carrier ((mdl M N) /\<^sub>m H) = N \<^sub>s/\<^sub>M H"
apply (rule equalityI)
apply (rule subsetI) apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def) apply auto
apply (frule_tac a = a in mQmpTr4 [of "R" "M" "H" "N"], assumption+)
apply (simp add:mdl_def) apply (simp add:mr_coset_def)
apply (simp add:sub_mr_set_cos_def)
apply (simp add:mdl_def)
apply auto
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply (simp add:sub_mr_set_cos_def)
apply auto
apply (frule_tac a1 = n in mQmpTr4[THEN sym, of "R" "M" "H" "N"], assumption+)
apply (simp add:mr_coset_def)
apply (subgoal_tac "carrier (mdl M N) = N") apply simp
apply (auto del:equalityI)
apply (simp add:mdl_def)
done
theorem misom2:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M N;
H \<subseteq> N\<rbrakk> \<Longrightarrow> (M /\<^sub>m H) /\<^sub>m (N \<^sub>s/\<^sub>M H) \<cong>\<^sub>R (M /\<^sub>m N)"
apply (frule misom2Tr [of "R" "M" "H" "N"], assumption+)
apply (simp add:eq_class_of_Submodule)
done
consts
natm :: "('a, 'm) AgroupType_scheme => nat \<Rightarrow> 'a => 'a"
primrec
natm_0: "natm M 0 x = 0\<^sub>M"
natm_Suc: "natm M (Suc n) x = (natm M n x) +\<^sub>M x"
constdefs
finitesum_base::"[('a, 'r, 'm) ModuleType_scheme, 'b set, 'b \<Rightarrow> 'a set]
\<Rightarrow> 'a set "
"finitesum_base M I f == \<Union>{f i | i. i \<in> I}"
constdefs
finitesum ::"[('a, 'r, 'm) ModuleType_scheme, 'b set, 'b \<Rightarrow> 'a set]
\<Rightarrow> 'a set "
"finitesum M I f == {x. \<exists>n. \<exists>g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> x = eSum M g n}"
lemma finitesumbase_sub_carrier:"\<lbrakk>ring R; R module M;
f \<in> I \<rightarrow> {X. submodule R M X}\<rbrakk> \<Longrightarrow> finitesum_base M I f \<subseteq> carrier M"
apply (simp add:finitesum_base_def)
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> x \<in> xa \<longrightarrow> x \<in> carrier M")
apply blast
apply (thin_tac "\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> x \<in> xa")
apply (rule allI)
apply (rule impI)
apply (erule conjE)+
apply auto
apply (frule_tac x = i in funcset_mem [of "f" "I" "Collect (submodule R M)"],
assumption+)
apply (thin_tac "f \<in> I \<rightarrow> Collect (submodule R M)")
apply (simp add:CollectI)
apply (simp add:submodule_def) apply (erule conjE)+
apply (simp add:subsetD)
done
lemma finitesum_ex_one:"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X};
I \<noteq> {}\<rbrakk> \<Longrightarrow> 0\<^sub>M \<in> finitesum M I f"
apply (simp add:finitesum_def)
apply (subgoal_tac "\<exists>i. i \<in> I") prefer 2 apply blast
apply (subgoal_tac "\<forall>i. i\<in>I \<longrightarrow> (\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> 0\<^sub>M = e\<Sigma> M g n)")
apply blast apply (thin_tac "\<exists>i. i \<in> I")
apply (rule allI) apply (rule impI)
apply (subgoal_tac "(\<lambda>x\<in>Nset 0. 0\<^sub>M) \<in> Nset 0 \<rightarrow> finitesum_base M I f \<and>
0\<^sub>M = e\<Sigma> M (\<lambda>x\<in>Nset 0. 0\<^sub>M) 0")
apply blast
apply (rule conjI)
apply (rule univar_func_test)
apply (rule ballI) apply (simp add:Nset_def)
apply (simp add:finitesum_base_def)
apply (frule_tac x = i in funcset_mem [of "f" "I" "{X. submodule R M X}"],
assumption+)
apply (simp add:CollectI) apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac H = "f i" in asubg_inc_zero [of "M"], assumption+)
apply blast
apply (simp add:Nset_def)
done
lemma finitesum_iOp_closed:"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X}; I \<noteq> {}; a \<in> finitesum M I f\<rbrakk> \<Longrightarrow> -\<^sub>M a \<in> finitesum M I f"
apply (simp add:finitesum_def)
apply (subgoal_tac "\<forall>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> a = e\<Sigma> M g n
\<longrightarrow> (\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> -\<^sub>M a = e\<Sigma> M g n)")
apply blast
apply (thin_tac "\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> a = e\<Sigma> M g n")
apply (rule allI)+ apply (rule impI)
apply (erule conjE) apply simp apply (thin_tac "a = e\<Sigma> M g n")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule finitesumbase_sub_carrier [of "R" "M" "f" "I"], assumption+)
apply (frule_tac f = g and A = "Nset n" and B = "finitesum_base M I f"
and ?B1.0 = "carrier M" in extend_fun, assumption+)
apply (simp add: eSum_minus [of M])
apply (subgoal_tac "(\<lambda>x\<in>Nset n. -\<^sub>M (g x)) \<in> Nset n \<rightarrow> finitesum_base M I f")
apply blast
apply (rule univar_func_test)
apply (rule ballI) apply simp
apply (frule_tac f = g and A = "Nset n" and B = "finitesum_base M I f" and
x = x in funcset_mem, assumption+)
apply (simp add:finitesum_base_def)
apply (subgoal_tac "\<forall>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> g x \<in> xa \<longrightarrow>
(\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> -\<^sub>M (g x) \<in> xa)")
apply blast
apply (thin_tac "\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> g x \<in> xa")
apply (rule allI) apply (rule impI)
apply (erule conjE)
apply (subgoal_tac "\<forall>i. xa = f i \<and> i \<in> I \<longrightarrow> (\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I)
\<and> -\<^sub>M (g x) \<in> xa)")
apply blast apply (thin_tac "\<exists>i. xa = f i \<and> i \<in> I")
apply (rule allI) apply (rule impI) apply (erule conjE)
apply (frule_tac f = f and A = I and B = "{X. submodule R M X}" and
x = i in funcset_mem, assumption+) apply (simp add:CollectI)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (thin_tac "f \<in> I \<rightarrow> {X. submodule R M X}")
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac H = "f i" and x = "g x" in asubg_mOp_closed [of "M"],
assumption+)
apply blast
done
lemma finitesum_tOp_closed:
"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X}; a \<in> finitesum M I f;
b \<in> finitesum M I f\<rbrakk> \<Longrightarrow> a +\<^sub>M b \<in> finitesum M I f"
apply (simp add:finitesum_def)
apply auto
apply (subgoal_tac "jointfun n g na ga \<in> Nset (Suc (n + na)) \<rightarrow> finitesum_base M I f")
apply (subgoal_tac "e\<Sigma> M g n +\<^sub>M (e\<Sigma> M ga na) = e\<Sigma> M (jointfun n g na ga) (Suc (n + na))")
apply (simp del:eSum_Suc)
apply blast
apply (frule finitesumbase_sub_carrier [of "R" "M" "f" "I"], assumption+)
apply (frule_tac f = g and A = "Nset n" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+)
apply (thin_tac "g \<in> Nset n \<rightarrow> finitesum_base M I f")
apply (frule_tac f = ga and A = "Nset na" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+)
apply (thin_tac "ga \<in> Nset na \<rightarrow> finitesum_base M I f")
apply (frule_tac f = "jointfun n g na ga" and A = "Nset (Suc (n + na))" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+)
apply (thin_tac "jointfun n g na ga \<in> Nset (Suc (n + na)) \<rightarrow> finitesum_base M I f")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst eSum_split, assumption+)
apply (subgoal_tac "e\<Sigma> M g n = e\<Sigma> M (jointfun n g na ga) n") apply simp
apply (subgoal_tac "e\<Sigma> M ga na = e\<Sigma> M (cmp (jointfun n g na ga) (slide (Suc n))) na") apply simp
apply (thin_tac "jointfun n g na ga \<in> Nset (Suc (n + na)) \<rightarrow> carrier M")
apply (thin_tac "e\<Sigma> M g n = e\<Sigma> M (jointfun n g na ga) n")
apply (simp add:cmp_def jointfun_def slide_def sliden_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule eSum_eq, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (subgoal_tac "x \<in> Nset (Suc (n + na))") apply (simp add:funcset_mem)
apply (simp add:Nset_def)
apply (rule ballI) apply (simp add:Nset_def jointfun_def)
apply (frule_tac f = g and n = n and A = "finitesum_base M I f" and
g = ga and m = na and B = "finitesum_base M I f" in jointfun_hom, assumption+)
apply simp
done
lemma finitesum_sprodTr:"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X};
I \<noteq> {}; r \<in> carrier R\<rbrakk> \<Longrightarrow> g \<in>Nset n \<rightarrow> (finitesum_base M I f)
\<longrightarrow> r \<star>\<^sub>M (eSum M g n) = eSum M (\<lambda>x. r \<star>\<^sub>M (g x)) n"
apply (induct_tac n)
apply (rule impI)
apply (simp add:Nset_def)
apply (rule impI)
apply (frule func_pre) apply simp
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule finitesumbase_sub_carrier [of "R" "M" "f" "I"], assumption+)
apply (frule_tac f = g and A = "Nset (Suc n)" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+)
apply (thin_tac "g \<in> Nset (Suc n) \<rightarrow> finitesum_base M I f")
apply (thin_tac "g \<in> Nset n \<rightarrow> finitesum_base M I f")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule func_pre)
apply (frule_tac n = n and i = n in eSum_mem [of "M" "g"], assumption+)
apply (simp add:Nset_def)
apply (frule_tac x = "Suc n" in funcset_mem [of "g" _ "carrier M"],
assumption+)
apply (subst sprod_distrib2, assumption+)
apply (simp del:eSum_Suc)
apply (simp add:Nset_def)
done
lemma finitesum_sprod:"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X};
I \<noteq> {}; r \<in> carrier R; g \<in>Nset n \<rightarrow> (finitesum_base M I f) \<rbrakk> \<Longrightarrow>
r \<star>\<^sub>M (eSum M g n) = eSum M (\<lambda>x. r \<star>\<^sub>M (g x)) n"
apply (simp add:finitesum_sprodTr)
done
lemma finitesum_subModule:"\<lbrakk>ring R; R module M; f \<in> I \<rightarrow> {X. submodule R M X};
I \<noteq> {}\<rbrakk> \<Longrightarrow> submodule R M (finitesum M I f)"
apply (simp add:submodule_def [of _ _ "(finitesum M I f)"])
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule conjI)
apply (simp add:finitesum_def)
apply (rule subsetI)
apply (simp add:CollectI)
apply (auto del:equalityI)
apply (frule finitesumbase_sub_carrier [of "R" "M" "f" "I"], assumption+)
apply (frule_tac f = g and A = "Nset n" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+)
apply (rule_tac n = n and i = n in eSum_mem [of "M"], assumption+)
apply (simp add:Nset_def)
apply (rule asubg_test, assumption+)
apply (rule subsetI)
apply (simp add:finitesum_def)
apply (subgoal_tac "\<forall>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> x = e\<Sigma> M g n
\<longrightarrow> x \<in> carrier M")
apply blast
apply (thin_tac "\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> x = e\<Sigma> M g n")
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (frule finitesumbase_sub_carrier [of "R" "M" "f" "I"], assumption+)
apply (frule_tac f = g and A = "Nset n" in extend_fun [of _ _ "finitesum_base M I f" "carrier M"], assumption+) apply simp
apply (rule_tac n = n and i = n in eSum_mem [of "M"], assumption+)
apply (simp add:Nset_def)
apply (frule finitesum_ex_one [of "R" "M" "f" "I"], assumption+)
apply (rule nonempty [of "0\<^sub>M" "finitesum M I f"], assumption+)
apply (rule ballI)+
apply (rule finitesum_tOp_closed, assumption+)
apply (rule finitesum_iOp_closed, assumption+)
apply (simp add:finitesum_def)
apply (subgoal_tac "\<forall>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> m = e\<Sigma> M g n
\<longrightarrow> (\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> a \<star>\<^sub>M m = e\<Sigma> M g n)")
apply blast
apply (thin_tac "\<exists>n g. g \<in> Nset n \<rightarrow> finitesum_base M I f \<and> m = e\<Sigma> M g n")
apply (rule allI)+
apply (rule impI) apply (erule conjE)
apply (simp add: finitesum_sprod)
apply (subgoal_tac "(\<lambda>x. a \<star>\<^sub>M (g x)) \<in> Nset n \<rightarrow> finitesum_base M I f")
apply blast
apply (rule univar_func_test)
apply (rule ballI)
apply (frule_tac x = x in funcset_mem [of _ _ "finitesum_base M I f"],
assumption+)
apply (simp add:finitesum_base_def)
apply (subgoal_tac "\<forall>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> g x \<in> xa \<longrightarrow>
(\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> a \<star>\<^sub>M (g x) \<in> xa)")
apply blast
apply (thin_tac "\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> g x \<in> xa")
apply (rule allI) apply (rule impI)
apply (erule conjE)
apply (subgoal_tac "\<forall>i. xa = f i \<and> i \<in> I \<longrightarrow> (\<exists>xa. (\<exists>i. xa = f i \<and> i \<in> I) \<and> a \<star>\<^sub>M (g x) \<in> xa)") apply blast
apply (thin_tac "\<exists>i. xa = f i \<and> i \<in> I")
apply (rule allI) apply (rule impI) apply (erule conjE)
apply (frule_tac x = i in funcset_mem [of "f" "I"], assumption+)
apply (simp add:CollectI) apply (simp add:submodule_def) apply (erule conjE)+
apply (subgoal_tac "a \<star>\<^sub>M (g x) \<in> f i")
apply blast
apply simp
done
constdefs
sSum ::"[('a, 'r, 'm1) ModuleType_scheme, 'a set, 'a set] \<Rightarrow> 'a set"
"sSum M H1 H2 == {x. \<exists>h1\<in>H1. \<exists>h2\<in>H2. x = h1 +\<^sub>M h2}"
syntax
"@SSUM":: "['a set, ('a, 'r, 'm1) ModuleType_scheme, 'a set] \<Rightarrow> 'a set"
("(3_/ \<plusminus>\<^sub>_/ _)" [60,60,61]60)
translations
"H1 \<plusminus>\<^sub>M H2" == "sSum M H1 H2"
lemma sSum_cont_H:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
H \<subseteq> H \<plusminus>\<^sub>M K"
apply (rule subsetI)
apply (simp add:sSum_def)
apply (frule submodule_inc_0 [of "R" "M" "K"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (frule_tac t = x in ag_r_zero [THEN sym, of "M"])
apply (rule submodule_subset1, assumption+)
apply blast
done
lemma sSum_commute:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
H \<plusminus>\<^sub>M K = K \<plusminus>\<^sub>M H"
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule equalityI)
apply (rule subsetI) apply (simp add:sSum_def)
apply auto
apply (frule_tac h = h1 in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule_tac h = h2 in submodule_subset1 [of "R" "M" "K"], assumption+)
apply (simplesubst ag_pOp_commute, assumption+)
apply blast
apply (simp add:sSum_def)
apply auto
apply (frule_tac h = h1 in submodule_subset1 [of "R" "M" "K"], assumption+)
apply (frule_tac h = h2 in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (simplesubst ag_pOp_commute, assumption+)
apply blast
done
lemma Sum_of_SubmodulesTr:"\<lbrakk>ring R; R module M; submodule R M H1; submodule R M H2\<rbrakk> \<Longrightarrow> g \<in> Nset n \<rightarrow> H1 \<union> H2 \<longrightarrow> e\<Sigma> M g n \<in> H1 \<plusminus>\<^sub>M H2"
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (induct_tac n)
apply (rule impI)
apply (subgoal_tac "0 \<in> Nset 0")
apply (frule funcset_mem [of "g" "Nset 0" "H1 \<union> H2" "0"], assumption+)
apply (simp add:sSum_def)
apply (case_tac "g 0 \<in> H1")
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac c = "g 0" in subsetD [of "H1" "carrier M"], assumption+)
apply (frule ag_r_zero [THEN sym, of "M" "g 0"], assumption+)
apply (frule asubg_inc_zero [of "M" "H2"], assumption+)
apply blast apply simp
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac c = "g 0" in subsetD [of "H2" "carrier M"], assumption+)
apply (frule ag_l_zero [THEN sym, of "M" "g 0"], assumption+)
apply (frule asubg_inc_zero [of "M" "H1"], assumption+)
apply blast apply (simp add:Nset_def)
apply (rule impI)
apply (frule func_pre) apply simp
apply (simp add:sSum_def)
apply auto apply (thin_tac "g \<in> Nset n \<rightarrow> H1 \<union> H2")
apply (frule_tac f = g and A = "Nset (Suc n)" and x = "Suc n" in
funcset_mem)
apply (simp add:Nset_def)
apply simp
apply (case_tac "g (Suc n) \<in> H1")
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac c = h1 in subsetD [of "H1" "carrier M"], assumption+)
apply (frule_tac c = "g (Suc n)" in subsetD [of "H1" "carrier M"],
assumption+)
apply (frule_tac c = h2 in subsetD [of "H2" "carrier M"], assumption+)
apply (simp add: ag_pOp_assoc)
apply (frule_tac x = h2 and y = "g (Suc n)" in ag_pOp_commute [of "M"],
assumption+)
apply (simp add: ag_pOp_assoc [symmetric])
apply (frule_tac x = h1 and y = "g (Suc n)" in asubg_pOp_closed [of "M" "H1"], assumption+)
apply blast apply simp
apply (simp add:submodule_def) apply (erule conjE)+
apply (frule_tac c = h1 in subsetD [of "H1" "carrier M"], assumption+)
apply (frule_tac c = h2 in subsetD [of "H2" "carrier M"], assumption+)
apply (frule_tac c = "g (Suc n)" in subsetD [of "H2" "carrier M"],
assumption+)
apply (simp add: ag_pOp_assoc)
apply (frule_tac x = h2 and y = "g (Suc n)" in asubg_pOp_closed [of "M" "H2"], assumption+)
apply blast
done
lemma sSum_two_Submodules:"\<lbrakk>ring R; R module M; submodule R M H1;
submodule R M H2\<rbrakk> \<Longrightarrow> submodule R M (H1 \<plusminus>\<^sub>M H2)"
apply (subgoal_tac "H1 \<plusminus>\<^sub>M H2 = finitesum M (Nset (Suc 0)) (\<lambda>x. (if x = 0 then H1 else if x = (Suc 0) then H2 else arbitrary))")
apply simp
apply (rule finitesum_subModule, assumption+)
apply (thin_tac "H1 \<plusminus>\<^sub>M H2 = finitesum M (Nset (Suc 0))
(\<lambda>x. if x = 0 then H1 else if x = Suc 0 then H2 else arbitrary)")
apply (rule univar_func_test)
apply (rule ballI)
apply (simp add:Nset_def)
apply (simp add:Nset_def) apply (subgoal_tac "0 \<le> Suc 0") apply blast
apply simp
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:sSum_def finitesum_def)
apply (auto del:subsetI)
apply (subgoal_tac "(\<lambda>x. if x = 0 then h1 else if x = (Suc 0) then h2 else
arbitrary) \<in> Nset (Suc 0) \<rightarrow> finitesum_base M (Nset (Suc 0))
(\<lambda>x. if x = 0 then H1 else if x = Suc 0 then H2 else arbitrary) \<and>
h1 +\<^sub>M h2 = e\<Sigma> M (\<lambda>x. if x = 0 then h1 else if x = (Suc 0) then h2 else
arbitrary) (Suc 0)")
apply blast
apply (rule conjI)
apply (rule univar_func_test) apply (rule ballI)
apply (case_tac "x = 0") apply simp
apply (simp add:finitesum_base_def)
apply blast
apply (subgoal_tac "x = Suc 0") apply (simp add:finitesum_base_def)
apply blast
apply (simp add:Nset_def)
apply simp
apply (simp add:finitesum_def) apply (rule subsetI)
apply (simp add:CollectI)
apply auto
apply (simp add:finitesum_base_def)
apply (subgoal_tac "\<Union>{if i = 0 then H1 else if i = Suc 0 then H2 else
arbitrary | i. i \<in> Nset (Suc 0)} = H1 \<union> H2")
apply (simp add:Sum_of_SubmodulesTr)
apply (thin_tac "g \<in> Nset n \<rightarrow> \<Union>{if i = 0 then H1
else if i = Suc 0 then H2 else arbitrary | i. i \<in> Nset (Suc 0)}")
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>xa. (\<exists>i. xa = (if i = 0 then H1
else if i = Suc 0 then H2 else arbitrary) \<and> i \<in> Nset (Suc 0)) \<and> x \<in> xa \<longrightarrow>
x \<in> H1 \<or> x \<in> H2")
apply blast
apply (thin_tac "\<exists>xa. (\<exists>i. xa = (if i = 0 then H1
else if i = Suc 0 then H2 else arbitrary) \<and> i \<in> Nset (Suc 0)) \<and> x \<in> xa")
apply (rule allI)
apply (rule impI)
apply (erule conjE)+
apply (subgoal_tac "\<forall>i. xa =
(if i = 0 then H1 else if i = Suc 0 then H2 else arbitrary) \<and>
i \<in> Nset (Suc 0) \<longrightarrow> x \<in> H1 \<or> x \<in> H2") apply blast
apply (thin_tac "\<exists>i. xa =
(if i = 0 then H1 else if i = Suc 0 then H2 else arbitrary) \<and>
i \<in> Nset (Suc 0)")
apply (rule allI) apply (rule impI)
apply (erule conjE)+
apply (case_tac "i = Suc 0") apply simp apply (frule Nset_pre, assumption+)
apply (simp add:Nset_def)
apply (rule subsetI)
apply (simp add:CollectI Nset_def)
apply blast
done
constdefs
iotam::"[('a, 'r, 'm) ModuleType_scheme, 'a set, 'a set] \<Rightarrow> ('a \<Rightarrow> 'a)"
("(3\<iota>m\<^sub>_ \<^sub>_\<^sub>,\<^sub>_)" [82, 82, 83]82)
"\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K == \<lambda>x\<in>H. (x +\<^sub>M (0\<^sub>M))" (** later we define miota. This is not
equal to iotam **)
lemma iotam_mHom:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk>
\<Longrightarrow> \<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K \<in> mHom R (mdl M H) (mdl M (H \<plusminus>\<^sub>M K))"
apply (simp add:mHom_def)
apply (rule conjI)
apply (simp add:aHom_def)
apply (simp add:mdl_def)
apply (rule conjI)
apply (rule univar_func_test)
apply (rule ballI)
apply (simp add:iotam_def sSum_def)
apply (frule submodule_inc_0 [of "R" "M" "K"], assumption+)
apply blast
apply (rule conjI)
apply (simp add:iotam_def extensional_def mdl_def)
apply (rule ballI)+
apply (simp add:mdl_def iotam_def)
apply (frule_tac h = a and k = b in submodule_pOp_closed [of "R" "M" "H"],
assumption+)
apply simp
apply (frule_tac h = a in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule_tac h = b in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule_tac h = "a +\<^sub>M b" in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:ag_r_zero)
apply (rule ballI)+
apply (simp add:mdl_def iotam_def)
apply (simp add:submodule_sprod_closed)
apply (frule_tac a = a and h = m in submodule_sprod_closed [of "R" "M" "H"],
assumption+)
apply (frule_tac h = m in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_r_zero, assumption+)
apply (frule_tac h = "a \<star>\<^sub>M m" in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (subst ag_r_zero, assumption+)
apply simp
done
lemma mhomom3Tr:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
submodule R (mdl M (H \<plusminus>\<^sub>M K)) K"
apply (subst submodule_def)
apply (rule conjI)
apply (simp add:mdl_def)
apply (subst sSum_commute, assumption+)
apply (simp add:sSum_cont_H)
apply (rule conjI)
apply (rule asubg_test)
apply (frule sSum_two_Submodules [of "R" "M" "H" "K"], assumption+)
apply (frule mdl_is_module [of "R" "M" "(H \<plusminus>\<^sub>M K)"], assumption+)
apply (rule module_is_ag, assumption+)
apply (simp add:mdl_def)
apply (subst sSum_commute, assumption+)
apply (simp add:sSum_cont_H)
apply (frule submodule_inc_0 [of "R" "M" "K"], assumption+)
apply (simp add:nonempty)
apply (rule ballI)+
apply (simp add:mdl_def)
apply (rule submodule_pOp_closed, assumption+)
apply (rule submodule_mOp_closed, assumption+)
apply (rule ballI)+
apply (simp add:mdl_def)
apply (simp add:submodule_sprod_closed)
done
lemma mhomom3Tr0:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk>
\<Longrightarrow> compos (mdl M H) (mpj (mdl M (H \<plusminus>\<^sub>M K)) K) (\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K)
\<in> mHom R (mdl M H) (mdl M (H \<plusminus>\<^sub>M K) /\<^sub>m K)"
apply (frule mdl_is_module [of "R" "M" "H"], assumption+)
apply (frule mhomom3Tr[of "R" "M" "H" "K"], assumption+)
apply (frule mdl_is_module [of "R" "M" "H \<plusminus>\<^sub>M K"], assumption+)
apply (frule sSum_two_Submodules [of "R" "M" "H" "K"], assumption+)
apply (frule iotam_mHom [of "R" "M" "H" "K"], assumption+)
apply (frule mpj_mHom [of "R" "mdl M (H \<plusminus>\<^sub>M K)" "K"], assumption+)
apply (rule mHom_compos [of "R" "mdl M H" "mdl M (H \<plusminus>\<^sub>M K)"], assumption+)
apply (simp add:qmodule_module) apply assumption
apply (simp add:mpj_mHom)
done
lemma mhomom3Tr1:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
surjec\<^sub>(mdl M H)\<^sub>,\<^sub>((mdl M (H \<plusminus>\<^sub>M K)) /\<^sub>m K)
(compos (mdl M H) (mpj (mdl M (H \<plusminus>\<^sub>M K)) K) (\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K))"
apply (simp add:surjec_def)
apply (frule mhomom3Tr0 [of "R" "M" "H" "K"], assumption+)
apply (rule conjI)
apply (simp add:mHom_def)
apply (rule surj_to_test)
apply (simp add:mHom_def aHom_def)
apply (rule ballI)
apply (simp add:compos_def compose_def)
apply (thin_tac "(\<lambda>x\<in>carrier (mdl M H). mpj (mdl M (H \<plusminus>\<^sub>M K)) K ((\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K) x))
\<in> mHom R (mdl M H) (mdl M (H \<plusminus>\<^sub>M K) /\<^sub>m K)")
apply (simp add:qmodule_def)
apply (simp add:set_mr_cos_def)
apply auto
apply (simp add:mdl_def) apply (fold mdl_def)
apply (subgoal_tac "\<exists>h\<in>H. \<exists>k\<in>K. a = h +\<^sub>M k")
apply (subgoal_tac "\<forall>h\<in>H. \<forall>k\<in>K. a = h +\<^sub>M k \<longrightarrow> (\<exists>aa\<in>H.
mpj (mdl M (H \<plusminus>\<^sub>M K)) K ((\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K) aa) = a \<uplus>\<^sub>(mdl M (H \<plusminus>\<^sub>M K)) K)")
apply blast apply (thin_tac "\<exists>h\<in>H. \<exists>k\<in>K. a = h +\<^sub>M k")
apply (rule ballI)+ apply (rule impI) apply simp
apply (subgoal_tac "(h +\<^sub>M k) \<uplus>\<^sub>(mdl M (H \<plusminus>\<^sub>M K)) K = h \<uplus>\<^sub>(mdl M (H \<plusminus>\<^sub>M K)) K")
apply simp
apply (simp add:iotam_def)
apply (simp add:mpj_def)
apply (subgoal_tac "\<forall>k. k\<in>H \<longrightarrow> k +\<^sub>M 0\<^sub>M \<in> carrier (mdl M ((H \<plusminus>\<^sub>M K)))")
apply simp
apply (subgoal_tac "\<forall>k. k\<in>H \<longrightarrow> k +\<^sub>M 0\<^sub>M = k") apply simp
apply blast
apply (rule allI) apply (rule impI)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule ag_r_zero, assumption+) apply (simp add:submodule_def)
apply (erule conjE)+ apply (simp add:subsetD)
apply (rule allI) apply (rule impI) apply (simp add:mdl_def)
apply (fold mdl_def) apply (simp add:sSum_def)
apply (frule submodule_inc_0 [of "R" "M" "K"], assumption+)
apply blast
apply (subgoal_tac "R module mdl M (H \<plusminus>\<^sub>M K)")
apply (frule_tac m = h and h = k in mr_cos_h_stable1 [of "R" "mdl M (H \<plusminus>\<^sub>M K)" "K"], assumption+)
apply (simp add:mhomom3Tr)
apply (simp add:mdl_def) apply (fold mdl_def)
apply (frule sSum_cont_H [of "R" "M" "H" "K"], assumption+)
apply (simp add:subsetD) apply assumption
apply (simp add:mdl_def)
apply (frule sSum_two_Submodules [of "R" "M" "H" "K"], assumption+)
apply (simp add: mdl_is_module)
apply (simp add:sSum_def)
done
lemma mhomom3Tr2:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
ker\<^sub>(mdl M H)\<^sub>,\<^sub>((mdl M (H \<plusminus>\<^sub>M K)) /\<^sub>m K)
(compos (mdl M H) (mpj (mdl M (H \<plusminus>\<^sub>M K)) K) (\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K)) = H \<inter> K"
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:ker_def) apply (erule conjE)
apply (simp add:qmodule_def)
apply (simp add:mdl_carrier)
apply (simp add:compos_def compose_def mdl_def iotam_def)
apply (fold mdl_def)
apply (subgoal_tac "x +\<^sub>M 0\<^sub>M \<in> carrier (mdl M (H \<plusminus>\<^sub>M K))")
apply (simp add:iotam_def mpj_def)
apply (frule sSum_two_Submodules[of "R" "M" "H" "K"], assumption+)
apply (frule mdl_is_module [of "R" "M" "H \<plusminus>\<^sub>M K"], assumption+)
apply (frule_tac m = "x +\<^sub>M 0\<^sub>M" in m_in_mr_coset [of "R" "mdl M (H \<plusminus>\<^sub>M K)" "K"],
assumption+)
apply (simp add:mhomom3Tr)
apply (simp add:mdl_carrier [of "R" "M" "H \<plusminus>\<^sub>M K"])
apply simp
apply (frule_tac h = x in submodule_subset1 [of "R" "M" "H"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:ag_r_zero)
apply (frule mdl_is_module [of "R" "M" "H \<plusminus>\<^sub>M K"], assumption+)
apply (simp add:sSum_two_Submodules[of "R" "M" "H" "K"])
apply (simp add:mdl_def) apply (fold mdl_def)
apply (frule submodule_inc_0 [of "R" "M" "K"], assumption+)
apply (simp add:sSum_def) apply blast
apply (rule subsetI)
apply (simp add:ker_def)
apply (simp add:mdl_carrier)
apply (simp add:qmodule_def)
apply (simp add:compos_def compose_def)
apply (subst mdl_carrier, assumption+) apply simp
apply (erule conjE)+
apply (simp add:iotam_def mpj_def)
apply (frule sSum_two_Submodules[of "R" "M" "H" "K"], assumption+)
apply (simp add: mdl_carrier)
apply (subgoal_tac "x +\<^sub>M 0\<^sub>M \<in> H \<plusminus>\<^sub>M K") apply simp
apply (frule mdl_is_module [of "R" "M" "H \<plusminus>\<^sub>M K"], assumption+)
apply (subgoal_tac "x +\<^sub>M 0\<^sub>M = x") apply simp
apply (frule_tac h1 = x in mr_cos_h_stable [THEN sym, of "R" "mdl M (H \<plusminus>\<^sub>M K)"
"K"], assumption+)
apply (simp add:mhomom3Tr) apply assumption+
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_r_zero, assumption+)
apply (simp add:submodule_def[of "R" "M" "H"]) apply (erule conjE)+
apply (simp add:subsetD) apply simp
apply (frule_tac submodule_inc_0 [of "R" "M" "K"], assumption+)
apply (simp add:sSum_def) apply blast
done
lemma mhomom_3:"\<lbrakk>ring R; R module M; submodule R M H; submodule R M K\<rbrakk> \<Longrightarrow>
(mdl M H) /\<^sub>m (H \<inter> K) \<cong>\<^sub>R (mdl M (H \<plusminus>\<^sub>M K)) /\<^sub>m K"
apply (frule sSum_two_Submodules [of "R" "M" "H" "K"], assumption+)
apply (frule mdl_is_module [of "R" "M" "H"], assumption+)
apply (frule mdl_is_module [of "R" "M" "K"], assumption+)
apply (frule mdl_is_module [of "R" "M" "H \<plusminus>\<^sub>M K"], assumption+)
apply (frule mhomom3Tr [of "R" "M" "H" "K"], assumption+)
apply (frule qmodule_module [of "R" "mdl M (H \<plusminus>\<^sub>M K)" "K"], assumption+)
apply (simp add:misomorphic_def)
apply (frule mhomom3Tr [of "R" "M" "H" "K"], assumption+)
apply (frule qmodule_module [of "R" "mdl M (H \<plusminus>\<^sub>M K)" "K"], assumption+)
apply (frule mhomom3Tr0 [of "R" "M" "H" "K"], assumption+)
apply (frule indmhom [of "R" "mdl M H" "mdl M (H \<plusminus>\<^sub>M K) /\<^sub>m K" "compos (mdl M H) (mpj (mdl M (H \<plusminus>\<^sub>M K)) K) (\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K)"], assumption+)
apply (subgoal_tac "bijec\<^sub>((mdl M H) /\<^sub>m (H \<inter> K))\<^sub>,\<^sub>((mdl M (H \<plusminus>\<^sub>M K)) /\<^sub>m K) (indmhom R (mdl M H) ((mdl M (H \<plusminus>\<^sub>M K)) /\<^sub>m K) (compos (mdl M H) (mpj (mdl M (H \<plusminus>\<^sub>M K)) K) (\<iota>m\<^sub>M \<^sub>H\<^sub>,\<^sub>K)))")
apply (simp add:mhomom3Tr2[THEN sym])
apply blast
apply (simp add:bijec_def)
apply (simp add:mhomom3Tr2[THEN sym])
apply (rule conjI)
apply (rule indmhom_injec, assumption+)
apply (rule indmhom_surjec1, assumption+)
apply (simp add: mhomom3Tr1)
apply assumption
done
constdefs
linear_combination::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme, nat] \<Rightarrow> (nat \<Rightarrow> 'r) \<Rightarrow> (nat \<Rightarrow> 'a) \<Rightarrow> 'a"
"linear_combination R M n s m == eSum M (\<lambda>j. (s j) \<star>\<^sub>M (m j)) n"
linear_span::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme, 'r set, 'a set] \<Rightarrow> 'a set"
"linear_span R M A H == if H = {} then {0\<^sub>M} else {x. \<exists>n. \<exists>f \<in> Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f}"
coefficient::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme,
nat, nat \<Rightarrow> 'r, nat \<Rightarrow> 'a] \<Rightarrow> nat \<Rightarrow> 'r"
"coefficient R M n s m j == s j"
body::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme,
nat, nat \<Rightarrow> 'r, nat \<Rightarrow> 'a] \<Rightarrow> nat \<Rightarrow> 'a"
"body R M n s m j == m j"
lemma linear_comb_eqTr:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> s \<in> Nset n \<rightarrow> carrier R \<and> f \<in> Nset n \<rightarrow> H \<and> g \<in> Nset n \<rightarrow> H \<and> (\<forall>j\<in>Nset n. f j = g j) \<longrightarrow>
linear_combination R M n s f = linear_combination R M n s g"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)+ apply (simp add:linear_combination_def)
apply (simp add:Nset_def)
apply (rule impI) apply (erule conjE)+
apply (subgoal_tac "\<forall>j. j \<in> Nset n \<longrightarrow> j \<in> Nset (Suc n)")
apply (frule_tac f = s in func_pre)
apply (frule_tac f = f in func_pre)
apply (frule_tac f = g in func_pre)
apply (subgoal_tac "linear_combination R M n s f = linear_combination R M n s g") prefer 2 apply simp
apply (thin_tac "s \<in> Nset n \<rightarrow> carrier R \<and> f \<in> Nset n \<rightarrow> H \<and> g \<in> Nset n \<rightarrow> H \<and> (\<forall>j\<in>Nset n. f j = g j) \<longrightarrow> linear_combination R M n s f = linear_combination R M n s g")
apply (thin_tac "\<forall>j. j \<in> Nset n \<longrightarrow> j \<in> Nset (Suc n)")
apply (simp add:linear_combination_def)
apply (subgoal_tac "f (Suc n) = g (Suc n)") apply simp
apply (simp add:Nset_def)+
done
lemma linear_comb_eq:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M; s \<in> Nset n \<rightarrow> carrier R; f \<in> Nset n \<rightarrow> H; g \<in> Nset n \<rightarrow> H; \<forall>j\<in>Nset n. f j = g j\<rbrakk> \<Longrightarrow>
linear_combination R M n s f = linear_combination R M n s g"
apply (simp add:linear_comb_eqTr)
done
lemma linear_comb0_1Tr:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow>
s \<in> Nset n \<rightarrow> {0\<^sub>R} \<and> m \<in> Nset n \<rightarrow> H \<longrightarrow> linear_combination R M n s m = 0\<^sub>M"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)
apply (simp add:linear_combination_def)
apply (subgoal_tac "0 \<in> Nset 0")
apply (subgoal_tac "s 0 = 0\<^sub>R") apply simp
apply (rule sprod_0_m, assumption+)
apply (simp add:funcset_mem subsetD)
apply (frule funcset_mem [of "s" "Nset 0" "{0\<^sub>R}" "0"], assumption+)
apply simp apply (simp add:Nset_def)
apply (rule impI) apply (erule conjE)
apply (frule func_pre [of _ _ "{0\<^sub>R}"])
apply (frule func_pre [of _ _ "H"])
apply (subgoal_tac "linear_combination R M n s m = 0\<^sub>M")
apply (thin_tac "s \<in> Nset n \<rightarrow> {0\<^sub>R} \<and> m \<in> Nset n \<rightarrow> H \<longrightarrow>
linear_combination R M n s m = 0\<^sub>M")
prefer 2 apply simp
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_l_zero, assumption+)
apply (rule sprod_mem, assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule_tac A = "Nset (Suc n)" and x = "Suc n" in funcset_mem [of "s" _ "{0\<^sub>R}" _], assumption+) apply simp apply (simp add:ring_zero)
apply (simp add:Nset_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem subsetD) apply (simp add:Nset_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule_tac A = "Nset (Suc n)" and x = "Suc n" in funcset_mem [of "s" _ "{0\<^sub>R}" _], assumption+) apply simp
apply (rule sprod_0_m, assumption+)
apply (simp add:funcset_mem subsetD)
apply (simp add:Nset_def)
done
lemma linear_comb0_1:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M; s \<in> Nset n \<rightarrow> {0\<^sub>R}; m \<in> Nset n \<rightarrow> H \<rbrakk> \<Longrightarrow> linear_combination R M n s m = 0\<^sub>M"
apply (simp add:linear_comb0_1Tr)
done
lemma linear_comb0_2Tr:"\<lbrakk>ring R; R module M; ideal R A\<rbrakk> \<Longrightarrow>
s \<in> Nset n \<rightarrow> A \<and> m \<in> Nset n \<rightarrow> {0\<^sub>M} \<longrightarrow> linear_combination R M n s m = 0\<^sub>M"
apply (induct_tac n )
apply (rule impI) apply (erule conjE)
apply (simp add:linear_combination_def)
apply (subgoal_tac "0 \<in> Nset 0")
apply (frule funcset_mem [of "m" "Nset 0" "{0\<^sub>M}" "0"], assumption+)
apply simp
apply (rule sprod_a_0, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:Nset_def)
apply (rule impI)
apply (erule conjE)+
apply (frule func_pre [of "s"])
apply (frule func_pre [of "m"])
apply (subgoal_tac "linear_combination R M n s m = 0\<^sub>M")
prefer 2 apply simp
apply (thin_tac " s \<in> Nset n \<rightarrow> A \<and> m \<in> Nset n \<rightarrow> {0\<^sub>M} \<longrightarrow>
linear_combination R M n s m = 0\<^sub>M")
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (subst ag_l_zero, assumption+)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (frule_tac A = "Nset (Suc n)" and x = "Suc n" in funcset_mem [of "m" _ "{0\<^sub>M}" ], assumption+)
apply simp apply (simp add:module_inc_zero)
apply (frule_tac A = "Nset (Suc n)" and x = "Suc n" in funcset_mem [of "m" _ "{0\<^sub>M}" ], assumption+) apply simp
apply (rule sprod_a_0, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:Nset_def)
done
lemma linear_comb0_2:"\<lbrakk>ring R; R module M; ideal R A; s \<in> Nset n \<rightarrow> A;
m \<in> Nset n \<rightarrow> {0\<^sub>M} \<rbrakk> \<Longrightarrow> linear_combination R M n s m = 0\<^sub>M"
apply (simp add:linear_comb0_2Tr)
done
lemma liear_comb_memTr:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow>
\<forall>s. \<forall>m. s \<in> Nset n \<rightarrow> A \<and> m \<in> Nset n \<rightarrow> H \<longrightarrow> linear_combination R M n s m \<in> carrier M"
apply (induct_tac n)
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (simp add:linear_combination_def Nset_def)
apply (rule sprod_mem [of "R" "M"], assumption+)
apply (subgoal_tac "(0::nat) \<in> {0}")
apply (simp add:funcset_mem ideal_subset subsetD) apply simp
apply (simp add:funcset_mem ideal_subset subsetD)
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (frule func_pre [of _ _ "A"])
apply (frule func_pre [of _ _ "H"])
apply (subgoal_tac "linear_combination R M n s m \<in> carrier M")
prefer 2 apply simp
apply (thin_tac "\<forall>s m. s \<in> Nset n \<rightarrow> A \<and> m \<in> Nset n \<rightarrow> H \<longrightarrow>
linear_combination R M n s m \<in> carrier M")
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule ag_pOp_closed, assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset subsetD)
apply (simp add:funcset_mem subsetD)
apply (simp add:Nset_def)
done
lemma linear_combination_mem:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M;
s \<in> Nset n \<rightarrow> A; m \<in> Nset n \<rightarrow> H\<rbrakk> \<Longrightarrow> linear_combination R M n s m \<in> carrier M"
apply (simp add:liear_comb_memTr)
done
lemma elem_linear_span:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M; a \<in> A;
h \<in> H\<rbrakk> \<Longrightarrow> a \<star>\<^sub>M h \<in> linear_span R M A H"
apply (simp add:linear_span_def)
apply (simp add:nonempty)
apply (simp add:linear_combination_def)
apply (subgoal_tac "(\<lambda>k\<in>Nset 0. a) \<in> Nset 0 \<rightarrow> A")
apply (subgoal_tac "(\<lambda>k\<in>Nset 0. h) \<in> Nset 0 \<rightarrow> H")
apply (subgoal_tac "a \<star>\<^sub>M h =
e\<Sigma> M (\<lambda>j. (\<lambda>k\<in>Nset 0. a) j \<star>\<^sub>M ((\<lambda>k\<in>Nset 0. h) j)) 0")
apply blast
apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
done
lemma elem_linear_span1:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> H \<subseteq> linear_span R M (carrier R) H"
apply (rule subsetI)
apply (frule_tac R = R and M = M and A = "carrier R" and H = H and a = "1\<^sub>R" and h = x in elem_linear_span, assumption+)
apply (simp add:whole_ideal)
apply assumption+
apply (simp add:ring_one)
apply assumption+
apply (frule_tac A = H and B = "carrier M" and c = x in subsetD, assumption+)
apply (simp add:sprod_one)
done
lemma linear_span_inc_0:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M\<rbrakk>
\<Longrightarrow> 0\<^sub>M \<in> linear_span R M A H"
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (subgoal_tac "\<exists>h. h \<in> H") prefer 2 apply blast
apply (subgoal_tac "\<forall>h. h \<in> H \<longrightarrow> 0\<^sub>M \<in> linear_span R M A H")
apply blast apply (thin_tac "\<exists>h. h \<in> H")
apply (rule allI) apply (rule impI)
apply (subgoal_tac "(\<lambda>j\<in>Nset 0. 0\<^sub>R) \<in> Nset 0 \<rightarrow> A")
apply (subgoal_tac "(\<lambda>j\<in>Nset 0. h) \<in> Nset 0 \<rightarrow> H")
apply (subgoal_tac "0\<^sub>M = linear_combination R M 0 (\<lambda>j\<in>Nset 0. 0\<^sub>R) (\<lambda>j\<in>Nset 0. h)")
apply (simp add:linear_span_def) apply blast
apply (simp add:linear_combination_def Nset_def)
apply (rule sprod_0_m[THEN sym], assumption+) apply (simp add:subsetD)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (simp add:ideal_zero)
done
lemma linear_span_iOp_closedTr1:"\<lbrakk>ring R; ideal R A; s \<in> Nset n \<rightarrow> A\<rbrakk>
\<Longrightarrow> (\<lambda>x\<in>Nset n. -\<^sub>R (s x)) \<in> Nset n \<rightarrow> A"
apply (rule univar_func_test) apply (rule ballI)
apply simp
apply (rule ideal_inv1_closed, assumption+)
apply (simp add:funcset_mem)
done
lemma linear_span_iOp_closedTr2:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M; f \<in> Nset n \<rightarrow> H; s \<in> Nset n \<rightarrow> A\<rbrakk> \<Longrightarrow> -\<^sub>M (linear_combination R M n s f) = linear_combination R M n (\<lambda>x\<in>Nset n. -\<^sub>R (s x)) f"
apply (subgoal_tac "H \<noteq> {}") prefer 2
apply (subgoal_tac "0 \<in> Nset n")
apply (frule_tac f = f and A = "Nset n" and B = H and x = 0 in funcset_mem,
assumption+)
apply (simp add:nonempty) apply (simp add:Nset_def)
apply (frule_tac R = R and A = A and s = s in linear_span_iOp_closedTr1, assumption+)
apply (subgoal_tac "-\<^sub>M (linear_combination R M n s f) = linear_combination R M n (\<lambda>x\<in>Nset n. -\<^sub>R (s x)) f")
apply blast
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst eSum_minus, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem[of "R" "M"], assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule eSum_eq, assumption+)
apply (rule univar_func_test) apply (rule ballI) apply simp
apply (rule ag_mOp_closed, assumption+)
apply (rule sprod_mem[of "R" "M"], assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test) apply (rule ballI) apply simp
apply (rule sprod_mem, assumption+)
apply (frule ring_is_ag)
apply (rule ag_mOp_closed [of "R"], assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply simp
apply (rule sprod_minus_am1, assumption+)
apply (rule funcset_mem ideal_subset, assumption+)
apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
done
lemma linear_span_iOp_closed:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M;
a \<in> linear_span R M A H\<rbrakk> \<Longrightarrow> -\<^sub>M a \<in> linear_span R M A H"
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:ag_minus_0_eq_0)
apply (simp add:linear_span_def)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A. a = linear_combination R M n s f \<longrightarrow>(\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A. -\<^sub>M a = linear_combination R M n s f)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A. a = linear_combination R M n s f")
apply(rule allI) apply (rule ballI)+ apply (rule impI) apply simp
apply (frule_tac R = R and A = A and s = s and n = n in linear_span_iOp_closedTr1,
assumption+)
apply (frule_tac R = R and M = M and A = A and H = H and f = f and s = s in linear_span_iOp_closedTr2, assumption+)
apply blast
done
lemma linear_span_tOp_closed:
"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M; a \<in> linear_span R M A H;
b \<in> linear_span R M A H\<rbrakk> \<Longrightarrow> a +\<^sub>M b \<in> linear_span R M A H"
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (frule module_is_ag, assumption+)
apply (frule ag_inc_zero)
apply (simp add:ag_r_zero)
apply (simp add:linear_span_def)
apply (subgoal_tac "\<forall>i j. \<forall>f \<in> Nset i \<rightarrow> H. \<forall>s\<in>Nset i \<rightarrow> A. \<forall>g\<in> Nset j \<rightarrow> H. \<forall>t\<in>Nset j \<rightarrow> A. a = linear_combination R M i s f \<and> b = linear_combination R M j t g \<longrightarrow> (\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A. a +\<^sub>M b = linear_combination R M n s f)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A.
a = linear_combination R M n s f")
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A.
b = linear_combination R M n s f")
apply (rule allI)+ apply (rule ballI)+ apply (rule impI)
apply (erule conjE) apply simp
apply (thin_tac "a = linear_combination R M i s f")
apply (thin_tac "b = linear_combination R M j t g")
apply (simp add:linear_combination_def)
apply (subgoal_tac "jointfun i f j g \<in> Nset (Suc (i + j)) \<rightarrow> H")
apply (subgoal_tac "jointfun i s j t \<in> Nset (Suc (i + j)) \<rightarrow> A")
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (f k)) i +\<^sub>M (e\<Sigma> M (\<lambda>l. t l \<star>\<^sub>M (g l)) j)
= e\<Sigma> M (\<lambda>u. (jointfun i s j t) u \<star>\<^sub>M ((jointfun i f j g) u)) (Suc (i + j))")
apply (simp del:eSum_Suc)
apply (thin_tac "e\<Sigma> M (\<lambda>k. (s k) \<star>\<^sub>M (f k)) i +\<^sub>M (e\<Sigma> M (\<lambda>l. (t l) \<star>\<^sub>M (g l)) j )
= e\<Sigma> M (\<lambda>u. (jointfun i s j t u) \<star>\<^sub>M (jointfun i f j g u)) (Suc (i + j))")
apply blast
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst eSum_split, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (f k)) i =
e\<Sigma> M (\<lambda>u. jointfun i s j t u \<star>\<^sub>M (jointfun i f j g u)) i")
apply (subgoal_tac "e\<Sigma> M (\<lambda>l. t l \<star>\<^sub>M (g l)) j = e\<Sigma> M (cmp
(\<lambda>u. jointfun i s j t u \<star>\<^sub>M (jointfun i f j g u)) (slide (Suc i))) j")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (f k)) i =
e\<Sigma> M (\<lambda>u. jointfun i s j t u \<star>\<^sub>M (jointfun i f j g u)) i")
apply (simp add:cmp_def jointfun_def slide_def sliden_def)
apply (rule eSum_eq, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:jointfun_def Nset_def)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply (simp add:jointfun_def Nset_def)
apply (frule_tac f = s and n = i and A = A and g = t and m = j and B = A in jointfun_hom, assumption+) apply simp
apply (frule_tac f = f and n = i and A = H and g = g and m = j and B = H in jointfun_hom, assumption+) apply simp
done
lemma linear_span_sprodTr:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M;
r \<in> carrier R; H \<noteq> {}\<rbrakk> \<Longrightarrow> s \<in> Nset n \<rightarrow> A \<and> g \<in> Nset n \<rightarrow> H
\<longrightarrow> r \<star>\<^sub>M (eSum M (\<lambda>k. (s k) \<star>\<^sub>M (g k)) n) =
eSum M (\<lambda>k. r \<star>\<^sub>M ((s k) \<star>\<^sub>M (g k))) n"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)+ apply (simp add:Nset_def)
apply (rule impI) apply (erule conjE)
apply (frule func_pre [of _ _ "A"]) apply (frule func_pre [of _ _ "H"])
apply (subgoal_tac "r \<star>\<^sub>M (e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (g k)) n) =
e\<Sigma> M (\<lambda>k. r \<star>\<^sub>M ( s k \<star>\<^sub>M (g k))) n")
prefer 2 apply simp
apply (thin_tac "s \<in> Nset n \<rightarrow> A \<and> g \<in> Nset n \<rightarrow> H \<longrightarrow>
r \<star>\<^sub>M (e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (g k)) n) = e\<Sigma> M (\<lambda>k. r \<star>\<^sub>M ( s k \<star>\<^sub>M (g k))) n")
apply simp
apply (subst sprod_distrib2, assumption+)
apply (frule_tac s = s and m = g and n = n in linear_combination_mem[of "R" "M" "A" "H"]
, assumption+)
apply (simp add:linear_combination_def)
apply (rule sprod_mem, assumption+)+
apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem subsetD)
apply simp
done
lemma linear_span_sprod:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M;
r \<in> carrier R; s \<in> Nset n \<rightarrow> A; g \<in> Nset n \<rightarrow> H \<rbrakk> \<Longrightarrow>
r \<star>\<^sub>M (eSum M (\<lambda>k. (s k) \<star>\<^sub>M (g k)) n) = eSum M (\<lambda>k. r \<star>\<^sub>M ((s k) \<star>\<^sub>M (g k))) n"
apply (case_tac "H \<noteq> {}")
apply (simp add:linear_span_sprodTr)
apply (subgoal_tac "0 \<in> Nset n") prefer 2 apply (simp add:Nset_def)
apply (simp add:Pi_def)
done
lemma linear_span_sprod_closed:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M;
r \<in> carrier R; x \<in> linear_span R M A H\<rbrakk> \<Longrightarrow> r \<star>\<^sub>M x \<in> linear_span R M A H"
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (simp add:sprod_a_0)
apply (simp add:linear_span_def)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f \<longrightarrow> (\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A. r \<star>\<^sub>M x = linear_combination R M n s f )")
apply blast
apply (rule allI)
apply (rule ballI)+ apply (rule impI) apply simp
apply (thin_tac "x = linear_combination R M n s f")
apply (simp add:linear_combination_def)
apply (simp add: linear_span_sprod)
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. r \<star>\<^sub>M ( s k \<star>\<^sub>M (f k))) n =
e\<Sigma> M (\<lambda>k. (r \<cdot>\<^sub>R (s k)) \<star>\<^sub>M (f k)) n")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>k. r \<star>\<^sub>M ( s k \<star>\<^sub>M (f k))) n
= e\<Sigma> M (\<lambda>k. r \<cdot>\<^sub>R (s k) \<star>\<^sub>M (f k)) n")
apply (subgoal_tac "(\<lambda>k\<in>Nset n. (r \<cdot>\<^sub>R (s k))) \<in> Nset n \<rightarrow> A")
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. r \<cdot>\<^sub>R (s k) \<star>\<^sub>M (f k)) n =
e\<Sigma> M (\<lambda>j. (\<lambda>k\<in>Nset n. r \<cdot>\<^sub>R (s k)) j \<star>\<^sub>M (f j)) n")
apply blast
apply (rule eSum_eq) apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test) apply (rule ballI)
apply simp
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule ballI) apply simp
apply (rule univar_func_test)
apply (rule ballI)
apply simp
apply (simp add:funcset_mem ideal_ring_multiple)
apply (rule eSum_eq)
apply (simp add:module_is_ag)
apply (rule univar_func_test)
apply (rule ballI)
apply (rule sprod_mem, assumption+)+
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test)
apply (rule ballI)
apply (rule sprod_mem, assumption+)+
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply (rule sprod_assoc [THEN sym], assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
done
lemma linear_span_subModule:"\<lbrakk>ring R; R module M; ideal R A; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> submodule R M (linear_span R M A H)"
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (simp add:submodule_0)
apply (simp add:submodule_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule conjI)
apply (simp add:linear_span_def)
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f \<longrightarrow> (x \<in> carrier M)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_mem)
apply (rule conjI)
apply (rule asubg_test) apply (simp add:module_is_ag)
apply (rule subsetI) apply (simp add:linear_span_def)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f \<longrightarrow> (x \<in> carrier M)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_mem)
apply (frule linear_span_inc_0, assumption+) apply (simp add:nonempty)
apply (rule ballI)+
apply (rule linear_span_tOp_closed, assumption+)
apply (rule linear_span_iOp_closed, assumption+)
apply (rule ballI)+
apply (simp add:linear_span_sprod_closed)
done
constdefs
smodule_ideal_coeff::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme,
'r set] \<Rightarrow> 'a set"
"smodule_ideal_coeff R M A == linear_span R M A (carrier M)"
syntax
"@SMLIDEALCOEFF" ::"['r set, ('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme] \<Rightarrow> 'a set" ("(3_/ \<odot>\<^sub>_/ _)" [64,64,65]64)
translations
"A \<odot>\<^sub>R M" == "smodule_ideal_coeff R M A"
lemma smodule_ideal_coeff_is_Submodule:"\<lbrakk>ring R; R module M; ideal R A \<rbrakk> \<Longrightarrow>
submodule R M (A \<odot>\<^sub>R M)"
apply (simp add:smodule_ideal_coeff_def)
apply (simp add:linear_span_subModule)
done
constdefs
quotient_of_submodules::"[('r, 'm) RingType_scheme,
('a, 'r, 'm1) ModuleType_scheme, 'a set, 'a set] \<Rightarrow> 'r set"
"quotient_of_submodules R M N P == {x | x. x\<in>carrier R \<and>
(linear_span R M (Rxa R x) P) \<subseteq> N}"
Annihilator::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme]
\<Rightarrow> 'r set" ("(Ann\<^sub>_ _)" [82,83]82)
"Ann\<^sub>R M == quotient_of_submodules R M {0\<^sub>M} (carrier M)"
syntax
"@QOFSUBMDS" :: "['a set, ('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme, 'a set] \<Rightarrow> 'r set" ("(4_/ \<^sub>_\<ddagger>\<^sub>_/ _)" [82,82,82,83]82)
translations
"N \<^sub>R\<ddagger>\<^sub>M P" == "quotient_of_submodules R M N P"
lemma quotient_of_submodules_inc_0Tr0:
"\<lbrakk>ring R; R module M\<rbrakk> \<Longrightarrow> f \<in> Nset n \<rightarrow> {0\<^sub>M} \<longrightarrow> e\<Sigma> M f n = 0\<^sub>M"
apply (frule module_is_ag, assumption+)
apply (frule ag_inc_zero [of "M"])
apply (induct_tac n)
apply (rule impI)
apply (simp add:Nset_def)
apply (frule funcset_mem [of "f" "{0}" "{0\<^sub>M}" "0"]) apply simp
apply simp
apply (rule impI)
apply (frule func_pre) apply simp
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule funcset_mem, assumption+) apply simp
apply (frule module_is_ag, assumption+)
apply (simp add:ag_l_zero)
apply (simp add:Nset_def)
done
lemma eSum_zero:
"\<lbrakk>ring R; R module M; f \<in> Nset n \<rightarrow> {0\<^sub>M}\<rbrakk> \<Longrightarrow> e\<Sigma> M f n = 0\<^sub>M"
apply (simp add:quotient_of_submodules_inc_0Tr0)
done
lemma quotient_of_submodules_inc_0:
"\<lbrakk>ring R; R module M; submodule R M P; submodule R M Q\<rbrakk> \<Longrightarrow> 0\<^sub>R \<in> (P \<^sub>R\<ddagger>\<^sub>M Q)"
apply (simp add:quotient_of_submodules_def)
apply (frule ring_is_ag)
apply (simp add:ag_inc_zero [of "R"])
apply (subgoal_tac "R \<diamondsuit> (0\<^sub>R) = {0\<^sub>R}") apply simp
apply (simp add:linear_span_def)
apply (subgoal_tac "Q \<noteq> {}")
apply simp
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> Q. \<forall>s\<in>Nset n \<rightarrow> {0\<^sub>R}.
x = linear_combination R M n s f \<longrightarrow> x \<in> P")
apply blast apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> Q. \<exists>s\<in>Nset n \<rightarrow> {0\<^sub>R}.
x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+
apply (rule impI)
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:submodule_def[of "R" "M" "P"])
apply (erule conjE)+
apply (rule eSum_mem1 [of "M" "P"], assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (subgoal_tac "s xa = 0\<^sub>R") apply simp
apply (subst sprod_0_m, assumption+)
apply (simp add:submodule_def) apply (erule conjE)+
apply (simp add:funcset_mem subsetD)
apply (rule submodule_inc_0 [of "R" "M" "P"], assumption+)
apply (simp add:submodule_def)
apply (frule_tac f = s and A = "Nset n" and B = "{0\<^sub>R}" and x = xa
in funcset_mem) apply simp+
apply (frule submodule_inc_0[of "R" "M" "Q"], assumption+)
apply (simp add:nonempty)
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:Rxa_def CollectI)
apply (auto del:subsetI)
apply (simp add:ring_times_x_0)
apply (simp add:Rxa_def)
apply (frule ring_is_ag)
apply (frule ag_inc_zero)
apply (frule ring_times_x_0 [THEN sym, of "R" "0\<^sub>R"], assumption+)
apply blast
done
lemma quotient_of_submodules_is_ideal:
"\<lbrakk>ring R; R module M; submodule R M P; submodule R M Q\<rbrakk> \<Longrightarrow> ideal R (P \<^sub>R\<ddagger>\<^sub>M Q)"
apply (frule quotient_of_submodules_inc_0 [of "R" "M" "P" "Q"], assumption+)
apply (rule ideal_condition, assumption+)
apply (simp add:quotient_of_submodules_def)
apply (rule subsetI)
apply (simp add:CollectI)
apply (simp add:nonempty) apply (thin_tac "0\<^sub>R \<in> P \<^sub>R\<ddagger>\<^sub>M Q")
apply (rule ballI)+
apply (simp add:quotient_of_submodules_def)
apply (erule conjE)+
apply (rule conjI)
apply (frule ring_is_ag)
apply (rule ag_pOp_closed, assumption+)
apply (rule ag_mOp_closed, assumption+)
apply (subst linear_span_def)
apply (subgoal_tac "Q \<noteq> {}") apply simp
prefer 2 apply (frule submodule_inc_0 [of "R" "M" "Q"], assumption+)
apply (simp add:nonempty)
apply (rule subsetI)
apply (simp add:CollectI)
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> Q. \<forall>s\<in>Nset n \<rightarrow> R \<diamondsuit> ( x +\<^sub>R -\<^sub>R y).
xa = linear_combination R M n s f \<longrightarrow> xa \<in> P")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> Q. \<exists>s\<in>Nset n \<rightarrow> R \<diamondsuit> ( x +\<^sub>R -\<^sub>R y).
xa = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subgoal_tac "P <+ M")
apply (rule eSum_mem1, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (frule_tac f = s and A = "Nset n" and B = "R \<diamondsuit> ( x +\<^sub>R -\<^sub>R y)" and
x = xb in funcset_mem, assumption+)
apply (simp add:Rxa_def) apply (fold Rxa_def)
apply (subgoal_tac "\<forall>r\<in>carrier R. s xb = r \<cdot>\<^sub>R ( x +\<^sub>R (-\<^sub>R y)) \<longrightarrow>
s xb \<star>\<^sub>M (f xb) \<in> P")
apply blast apply (thin_tac "\<exists>r\<in>carrier R. s xb = r \<cdot>\<^sub>R ( x +\<^sub>R -\<^sub>R y)")
apply (rule ballI) apply (rule impI) apply simp
apply (subst ring_distrib1, assumption+)
apply (frule ring_is_ag)
apply (rule ag_mOp_closed, assumption+)
apply (subst sprod_distrib1, assumption+)
apply (simp add:ring_tOp_closed)
apply (rule ring_tOp_closed, assumption+)
apply (frule ring_is_ag) apply (rule ag_mOp_closed, assumption+)
apply (subgoal_tac "Q \<subseteq> carrier M") prefer 2 apply (simp add:submodule_def)
apply (simp add:funcset_mem subsetD)
apply (rule submodule_pOp_closed, assumption+)
apply (frule_tac f = f and A = "Nset n" and B = Q and x = xb in
funcset_mem, assumption+)
apply (frule_tac A = "R \<diamondsuit> x" and a = "r \<cdot>\<^sub>R x" and h = "f xb" in
elem_linear_span [of "R" "M" _ "Q"], assumption+)
apply (simp add:principal_ideal)
apply (rule subsetI)
apply (simp add:submodule_subset1)
apply (simp add:Rxa_def) apply blast apply assumption
apply (rule subsetD, assumption+)
apply (frule_tac A = "R \<diamondsuit> y" and a = "r \<cdot>\<^sub>R (-\<^sub>R y)" and h = "f xb" in
elem_linear_span [of "R" "M" _ "Q"], assumption+)
apply (simp add:principal_ideal)
apply (rule subsetI)
apply (simp add:submodule_subset1)
apply (subst ring_inv1_2 [THEN sym], assumption+)
apply (rule ideal_inv1_closed, assumption+)
apply (simp add:principal_ideal) apply (simp add:Rxa_def) apply blast
apply (simp add:funcset_mem) apply (simp add:subsetD)
apply (simp add:submodule_def [of "R" "M" "P"])
apply (rule ballI)+
apply (simp add:quotient_of_submodules_def)
apply (erule conjE)+
apply (rule conjI)
apply (simp add:ring_tOp_closed)
apply (subst linear_span_def)
apply (frule submodule_inc_0 [of "R" "M" "Q"], assumption+)
apply (simp add:nonempty)
apply (rule subsetI) apply (simp add:CollectI)
apply auto
apply (subgoal_tac "linear_combination R M n s f \<in> linear_span R M (R \<diamondsuit> x) Q")
apply (thin_tac "linear_span R M (R \<diamondsuit> (0\<^sub>R)) Q \<subseteq> P")
apply (rule subsetD, assumption+)
apply (subgoal_tac "s \<in> Nset n \<rightarrow> R \<diamondsuit> x")
apply (simp add:linear_span_def linear_combination_def)
apply (simp add:nonempty) apply blast
apply (rule univar_func_test) apply (rule ballI)
apply (frule_tac f = s and A = "Nset n" and B = "R \<diamondsuit> ( r \<cdot>\<^sub>R x)" and x = xa in
funcset_mem, assumption+)
apply (thin_tac "linear_span R M (R \<diamondsuit> (0\<^sub>R)) Q \<subseteq> P")
apply (thin_tac "linear_span R M (R \<diamondsuit> x) Q \<subseteq> P")
apply (thin_tac "s \<in> Nset n \<rightarrow> R \<diamondsuit> ( r \<cdot>\<^sub>R x)")
apply (simp add:Rxa_def)
apply auto
apply (simp add: ring_tOp_assoc [THEN sym])
apply (frule_tac x = ra and y = r in ring_tOp_closed [of "R"], assumption+)
apply blast
done
lemma Ann_is_ideal:"\<lbrakk>ring R; R module M \<rbrakk> \<Longrightarrow> ideal R (Ann\<^sub>R M)"
apply (simp add:Annihilator_def)
apply (rule quotient_of_submodules_is_ideal, assumption+)
apply (simp add:submodule_0)
apply (simp add:submodule_whole)
done
lemma linmap_im_of_lincombTr:"\<lbrakk>ring R; ideal R A; R module M; R module N; f \<in> mHom R M N; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow> s \<in> Nset n \<rightarrow> A \<and> g \<in> Nset n \<rightarrow> H \<longrightarrow>
f (linear_combination R M n s g) = linear_combination R N n s (cmp f g)"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)
apply (simp add:linear_combination_def)
apply (frule_tac m = "g 0" and f = f and a = "s 0" in mHom_lin [of "R" "M" "N"], assumption+)
apply (subgoal_tac "0 \<in> Nset 0")
apply (simp add:funcset_mem subsetD) apply (simp add:n_in_Nsetn)
apply assumption
apply (subgoal_tac "0 \<in> Nset 0")
apply (simp add:funcset_mem ideal_subset) apply (simp add:n_in_Nsetn)
apply (simp add:cmp_def)
apply (rule impI) apply (erule conjE)
apply (frule_tac f = s in func_pre) apply (frule_tac f = g in func_pre)
apply (subgoal_tac "f (linear_combination R M n s g) =
linear_combination R N n s (cmp f g)")
prefer 2 apply simp
apply (simp add:linear_combination_def)
apply (subst mHom_add[of "R" "M" "N" "f"], assumption+)
apply (rule_tac R = M and f = "(\<lambda>j. s j \<star>\<^sub>M (g j))" and n = n and i = n in eSum_mem) apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI) apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD) apply (simp add:n_in_Nsetn)
apply (rule sprod_mem, assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem ideal_subset) apply (simp add:n_in_Nsetn)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem subsetD) apply (simp add:n_in_Nsetn)
apply simp
apply (subgoal_tac "f ( s (Suc n) \<star>\<^sub>M (g (Suc n))) = (s (Suc n)) \<star>\<^sub>N ((cmp f g) (Suc n))") apply simp
apply (frule_tac m = "g (Suc n)" and f = f and a = "s (Suc n)" in mHom_lin [of "R" "M" "N"], assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem subsetD) apply (simp add:n_in_Nsetn)
apply assumption
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem ideal_subset) apply (simp add:n_in_Nsetn)
apply (simp add:cmp_def)
done
lemma linmap_im_lincomb:"\<lbrakk>ring R; ideal R A; R module M; R module N; f \<in> mHom R M N; H \<subseteq> carrier M; s \<in> Nset n \<rightarrow> A; g \<in> Nset n \<rightarrow> H \<rbrakk> \<Longrightarrow>
f (linear_combination R M n s g) = linear_combination R N n s (cmp f g)"
apply (simp add:linmap_im_of_lincombTr)
done
lemma linmap_im_linspan:"\<lbrakk>ring R; ideal R A; R module M; R module N; f \<in> mHom R M N; H \<subseteq> carrier M; s \<in> Nset n \<rightarrow> A; g \<in> Nset n \<rightarrow> H \<rbrakk> \<Longrightarrow>
f (linear_combination R M n s g) \<in> linear_span R N A (f ` H)"
apply (subgoal_tac "linear_combination R M n s g \<in> linear_span R M A H")
apply (simp add:linear_span_def)
apply (case_tac "H = {}") apply simp apply (simp add:mHom_0)
apply simp
apply (thin_tac "\<exists>na. \<exists>f\<in>Nset na \<rightarrow> H. \<exists>sa\<in>Nset na \<rightarrow> A.
linear_combination R M n s g = linear_combination R M na sa f")
apply (simp add: linmap_im_lincomb [of "R" "A" "M" "N" "f" "H" "s" "n" "g"])
apply (subgoal_tac "(cmp f g) \<in> Nset n \<rightarrow> f ` H")
apply blast
apply (rule univar_func_test) apply (rule ballI) apply (simp add:cmp_def)
apply (frule_tac f = g and A = "Nset n" and B = H and x = x in funcset_mem,
assumption+) apply (simp add:image_def) apply blast
apply (simp add:linear_combination_def linear_span_def)
apply (subgoal_tac "0 \<in> Nset n") prefer 2 apply (simp add:Nset_def)
apply (frule_tac f = g and A = "Nset n" and B = H and x = 0 in funcset_mem,
assumption+)
apply (simp add:nonempty)
apply blast
done
lemma linmap_im_linspan1:"\<lbrakk>ring R; ideal R A; R module M; R module N; f \<in> mHom R M N; H \<subseteq> carrier M; h \<in> linear_span R M A H\<rbrakk> \<Longrightarrow>
f h \<in> linear_span R N A (f ` H)"
apply (simp add:linear_span_def [of "R" "M"])
apply (case_tac "H = {}") apply (simp add:linear_span_def)
apply (simp add:mHom_0) apply simp
apply (subgoal_tac "\<forall>n. \<forall>g\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A.
h = linear_combination R M n s g \<longrightarrow> f h \<in> linear_span R N A (f ` H)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H. \<exists>s\<in>Nset n \<rightarrow> A. h = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linmap_im_linspan)
done
section "3. a module over two rings"
record ('a, 'r1, 'r2) bModuleType = "'a AgroupType" +
sprodl :: "'r1 \<Rightarrow> 'a \<Rightarrow> 'a"
sprodr :: "'r2 \<Rightarrow> 'a \<Rightarrow> 'a"
constdefs
bModule ::"[('r1, 'm1) RingType_scheme, ('r2, 'm2) RingType_scheme, ('a, 'r1, 'r2, 'more) bModuleType_scheme] \<Rightarrow> bool"
("(3_/ _/ bModule/ _)" [82,82,83]82)
"R S bModule M == ring R \<and> ring S \<and> agroup M \<and>
sprodl M \<in> carrier R \<rightarrow> carrier M \<rightarrow> carrier M \<and>
(\<forall>a \<in> carrier R. \<forall>b\<in> carrier R. \<forall>m\<in>carrier M. \<forall>n\<in>carrier M.
sprodl M (tOp R a b) m = sprodl M a (sprodl M b m) \<and>
sprodl M (pOp R a b) m = pOp M (sprodl M a m) (sprodl M b m) \<and>
sprodl M a (pOp M m n) = pOp M (sprodl M a m) (sprodl M a n) \<and>
sprodl M (1\<^sub>R) m = m) \<and>
sprodr M \<in> carrier S \<rightarrow> carrier M \<rightarrow> carrier M \<and>
(\<forall>a \<in> carrier S. \<forall>b\<in> carrier S. \<forall>m\<in>carrier M. \<forall>n\<in>carrier M.
sprodr M (tOp S a b) m = sprodr M a (sprodr M b m) \<and>
sprodr M (pOp S a b) m = pOp M (sprodr M a m) (sprodr M b m) \<and>
sprodr M a (pOp M m n) = pOp M (sprodr M a m) (sprodr M a n) \<and>
sprodr M (1\<^sub>S) m = m)"
constdefs
lModule::"('a, 'r1, 'r2, 'more) bModuleType_scheme \<Rightarrow> ('a, 'r1) ModuleType"
("(_\<^sub>l)" [1000]999)
"M\<^sub>l == \<lparr>carrier = carrier M, pOp = pOp M, mOp = mOp M,
zero = zero M, sprod = sprodl M \<rparr>"
constdefs
rModule::"('a, 'r1, 'r2, 'more) bModuleType_scheme \<Rightarrow> ('a, 'r2) ModuleType"
("(_\<^sub>r)" [1000]999)
"M\<^sub>r == \<lparr>carrier = carrier M, pOp = pOp M, mOp = mOp M,
zero = zero M, sprod = sprodr M \<rparr>"
lemma bmodule_is_ag:"\<lbrakk>ring R; ring S; R S bModule M\<rbrakk> \<Longrightarrow> agroup M"
apply (simp add:bModule_def)
done
lemma bModule_is_lModule:"\<lbrakk>ring R; ring S; R S bModule M\<rbrakk> \<Longrightarrow> R module M\<^sub>l"
apply (subgoal_tac "agroup \<lparr>carrier = carrier M, pOp = pOp M,
mOp = mOp M, zero = 0\<^sub>M, sprod = sprodl M\<rparr>")
apply (simp add:bModule_def lModule_def Module_def)
apply (frule bmodule_is_ag [of "R" "S" "M"], assumption+)
apply (simp add:agroup_def) apply (fold agroup_def)
apply (rule impI) apply (rule ballI)
apply (simp add:ag_r_zero)
done
lemma bModule_is_rModule:"\<lbrakk>ring R; ring S; R S bModule M\<rbrakk> \<Longrightarrow> S module M\<^sub>r"
apply (subgoal_tac "agroup \<lparr>carrier = carrier M, pOp = pOp M,
mOp = mOp M, zero = 0\<^sub>M, sprod = sprodr M\<rparr>")
apply (simp add:bModule_def rModule_def Module_def)
apply (frule bmodule_is_ag [of "R" "S" "M"], assumption+)
apply (simp add:agroup_def) apply (fold agroup_def)
apply (rule impI) apply (rule ballI)
apply (simp add:ag_r_zero)
done
lemma sprodr_welldefTr1:"\<lbrakk>ring R; R module M; ideal R A; A \<subseteq> Ann\<^sub>R M; a \<in> A;
m \<in> carrier M\<rbrakk> \<Longrightarrow> a \<star>\<^sub>M m = 0\<^sub>M "
apply (simp add:Annihilator_def quotient_of_submodules_def)
apply (frule subsetD, assumption+)
apply (simp add:CollectI) apply (erule conjE)
apply (frule_tac a = a and A = "R \<diamondsuit> a" in elem_linear_span [of "R" "M" _ "carrier M" _ "m"], assumption+)
apply (simp add:principal_ideal) apply simp apply (simp add:a_in_principal)
apply assumption
apply (frule subsetD [of "linear_span R M (R \<diamondsuit> a) (carrier M)" "{0\<^sub>M}"
"a \<star>\<^sub>M m"], assumption+) apply simp
done
lemma sprodr_welldefTr2:"\<lbrakk>ring R; R module M; ideal R A; A \<subseteq> Ann\<^sub>R M;
a \<in> carrier R; x \<in> a \<uplus>\<^sub>R A; m \<in> carrier M\<rbrakk> \<Longrightarrow> a \<star>\<^sub>M m = x \<star>\<^sub>M m"
apply (frule mem_ar_coset1 [of "R" "A" "a" "x"], assumption+)
apply auto
apply (subst sprod_distrib1, assumption+)
apply (simp add:ideal_subset)
apply assumption+
apply (simp add:sprodr_welldefTr1)
apply (frule sprod_mem [of "R" "M" "a" "m"], assumption+)
apply (frule module_is_ag, assumption+)
apply (simp add:ag_l_zero)
done
constdefs
cos_sprodr::"[('r, 'm) RingType_scheme, 'r set, ('a, 'r, 'm1) ModuleType_scheme] \<Rightarrow> 'r set \<Rightarrow> 'a \<Rightarrow> 'a"
"cos_sprodr R A M == \<lambda>X. \<lambda>m. (SOME x. x \<in> X) \<star>\<^sub>M m"
lemma cos_sprodr_welldef:"\<lbrakk>ring R; R module M; ideal R A; A \<subseteq> Ann\<^sub>R M;
X \<in> set_ar_cos R A; a \<in> carrier R; X = a \<uplus>\<^sub>R A; m \<in> carrier M\<rbrakk> \<Longrightarrow>
cos_sprodr R A M X m = a \<star>\<^sub>M m"
apply (simp add:set_ar_cos_def)
apply (subgoal_tac "\<forall>aa\<in>carrier R. a \<uplus>\<^sub>R A = aa \<uplus>\<^sub>R A \<longrightarrow>
cos_sprodr R A M (a \<uplus>\<^sub>R A) m = a \<star>\<^sub>M m")
apply blast
apply (thin_tac "\<exists>aa\<in>carrier R. a \<uplus>\<^sub>R A = aa \<uplus>\<^sub>R A")
apply (rule ballI) apply (rule impI)
apply (frule a_in_ar_coset [of "R" "A" "a"], assumption+)
apply (thin_tac "a \<uplus>\<^sub>R A = aa \<uplus>\<^sub>R A")
apply (simp add:cos_sprodr_def)
apply (rule sprodr_welldefTr2[THEN sym], assumption+) prefer 2 apply simp
apply (rule someI2_ex) apply blast apply assumption
done
constdefs
r_qr_bmod::"[('r, 'm) RingType_scheme, 'r set, ('a, 'r, 'm1) ModuleType_scheme] \<Rightarrow> ('a, 'r, 'r set) bModuleType"
"r_qr_bmod R A M == \<lparr>carrier = carrier M, pOp = pOp M, mOp = mOp M,
zero = zero M, sprodl = sprod M, sprodr = cos_sprodr R A M \<rparr>"
(* Remark. A should be an ideal contained in Ann\<^sub>R M. *)
syntax
"@RQBMOD" :: "[('a, 'r, 'm1) ModuleType_scheme, ('r, 'm) RingType_scheme,
'r set] \<Rightarrow> ('a, 'r, 'r set) bModuleType" ("(3_\<^sub>_\<^sub>'/'\<^sub>_)" [84,84,85]84)
translations
"M\<^sub>R\<^sub>/\<^sub>A" == "r_qr_bmod R A M"
lemma r_qr_Mmodule:"\<lbrakk>ring R; R module M; A \<subseteq> Ann\<^sub>R M; ideal R A\<rbrakk> \<Longrightarrow> R (R /\<^sub>r A) bModule M\<^sub>R\<^sub>/\<^sub>A"
apply (simp add:bModule_def)
apply (simp add:r_qr_bmod_def)
apply (simp add:qring_ring)
apply (subgoal_tac " agroup
\<lparr>carrier = carrier M, pOp = pOp M, mOp = mOp M, zero = 0\<^sub>M,
sprodl = sprod M, sprodr = cos_sprodr R A M\<rparr>") apply simp
prefer 2 apply (frule module_is_ag [of "R" "M"], assumption+)
apply (simp add:agroup_def) apply (fold agroup_def)
apply (rule impI) apply (rule ballI) apply (simp add:ag_r_zero)
apply (thin_tac " agroup
\<lparr>carrier = carrier M, pOp = pOp M, mOp = mOp M, zero = 0\<^sub>M,
sprodl = sprod M, sprodr = cos_sprodr R A M\<rparr>")
apply (rule conjI)
apply (simp add:Module_def)
apply (rule conjI)
apply (simp add:Module_def)
apply (rule conjI) apply (simp add:qring_def)
apply (subgoal_tac "set_r_cos (b_ag R) A = set_ar_cos R A") apply simp
apply (rule bivar_func_test) apply (rule ballI)+
apply (thin_tac "set_r_cos (b_ag R) A = set_ar_cos R A")
apply (simp add:set_ar_cos_def)
apply (subgoal_tac "\<forall>aa\<in>carrier R. a = aa \<uplus>\<^sub>R A \<longrightarrow>
cos_sprodr R A M a b \<in> carrier M")
apply blast apply (thin_tac "\<exists>aa\<in>carrier R. a = aa \<uplus>\<^sub>R A")
apply (rule ballI) apply (rule impI) apply simp
apply (rename_tac X m a)
apply (frule_tac X = "a \<uplus>\<^sub>R A" and a = a and m = m in
cos_sprodr_welldef[of "R" "M" "A"], assumption+)
apply (simp add:set_ar_cos_def) apply blast
apply assumption apply simp apply assumption apply simp
apply (simp add:sprod_mem)
apply (simp add:set_ar_cos_def)
apply (frule ring_is_ag)
apply (frule b_ag_group)
apply (simp add:ag_carrier_carrier [THEN sym])
apply (simp add:ar_coset_def set_r_cos_def)
apply (rule ballI)+
apply (frule ring_is_ag)
apply (frule b_ag_group)
apply (simp add:qring_def)
apply (subgoal_tac "set_r_cos (b_ag R) A = set_ar_cos R A") apply simp
apply (rename_tac X Y m n)
apply (subgoal_tac "\<exists>x\<in>carrier R. X = x \<uplus>\<^sub>R A")
apply (subgoal_tac "\<exists>y\<in>carrier R. Y = y \<uplus>\<^sub>R A")
apply (subgoal_tac "\<forall>x \<in> carrier R. \<forall>y\<in> carrier R. X = x \<uplus>\<^sub>R A \<and> Y = y \<uplus>\<^sub>R A
\<longrightarrow> cos_sprodr R A M (rcostOp R A X Y) m =
cos_sprodr R A M X (cos_sprodr R A M Y m) \<and>
cos_sprodr R A M (costOp (b_ag R) A X Y) m =
cos_sprodr R A M X m +\<^sub>M (cos_sprodr R A M Y m) \<and>
cos_sprodr R A M X ( m +\<^sub>M n) =
cos_sprodr R A M X m +\<^sub>M (cos_sprodr R A M X n) \<and>
cos_sprodr R A M (1\<^sub>R \<uplus>\<^sub>R A) m = m")
apply blast
apply (thin_tac "\<exists>x\<in>carrier R. X = x \<uplus>\<^sub>R A")
apply (thin_tac "\<exists>y\<in>carrier R. Y = y \<uplus>\<^sub>R A")
apply (rule ballI)+
apply (rule impI) apply (erule conjE) apply simp
apply (subst rcostOp, assumption+)
apply (frule_tac x = x and y = y in ring_tOp_closed, assumption+)
apply (simp add:cos_sprodr_welldef)
apply (subgoal_tac "costOp (b_ag R) A (x \<uplus>\<^sub>R A) (y \<uplus>\<^sub>R A) = (x +\<^sub>R y) \<uplus>\<^sub>R A")
apply simp
prefer 3 apply (simp add:set_ar_cos_def)
prefer 3 apply (simp add:set_ar_cos_def)
prefer 3 apply (simp add:set_ar_cos_def)
apply (simp add:ag_carrier_carrier [THEN sym])
apply (simp add:set_r_cos_def ar_coset_def)
prefer 2
apply (simp add:ag_carrier_carrier [THEN sym])
apply (simp add:ar_coset_def) apply (simp add:agop_gop [THEN sym])
apply (rule costOpwelldef [THEN sym], assumption+)
apply (simp add:ideal_def) apply (erule conjE)
apply (simp add:asubg_nsubg) apply assumption+
apply (frule_tac x = x and y = y in ag_pOp_closed[of "R"], assumption+)
apply (frule module_is_ag [of "R" "M"], assumption)
apply (frule_tac x = m and y = n in ag_pOp_closed [of "M"], assumption+)
apply (frule_tac a = y and m = m in sprod_mem [of "R" "M"], assumption+)
apply (frule ring_one [of "R"])
apply (simp add:cos_sprodr_welldef)
apply (frule_tac X = "x \<cdot>\<^sub>R y \<uplus>\<^sub>R A" and a = "x \<cdot>\<^sub>R y" and m = m in
cos_sprodr_welldef [of "R" "M" "A"], assumption+)
apply (simp add:set_ar_cos_def) apply blast apply assumption apply simp
apply assumption apply simp
apply (simp add:sprod_assoc)
apply (frule ring_one [of "R"])
apply (frule_tac X = "(x +\<^sub>R y) \<uplus>\<^sub>R A" and a = "(x +\<^sub>R y)" and m = m in
cos_sprodr_welldef [of "R" "M" "A"], assumption+)
apply (simp add:set_ar_cos_def) apply blast
apply simp+
apply (simp add:sprod_distrib1)
apply (simp add:sprod_distrib2)
apply (frule_tac X = "1\<^sub>R \<uplus>\<^sub>R A" and a = "1\<^sub>R" and m = m in
cos_sprodr_welldef [of "R" "M" "A"], assumption+)
apply (simp add:set_ar_cos_def) apply blast apply assumption apply simp+
apply (simp add:sprod_one)
done
constdefs
faithful::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme]
\<Rightarrow> bool"
"faithful R M == Ann\<^sub>R M = {0\<^sub>R}"
section "4. eSum and Generators"
constdefs
generator ::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme,
'a set] \<Rightarrow> bool"
"generator R M H == H \<subseteq> carrier M \<and>
linear_span R M (carrier R) H = carrier M"
finite_generator::"[('r, 'm) RingType_scheme, ('a, 'r, 'm1) ModuleType_scheme,
'a set] \<Rightarrow> bool"
"finite_generator R M H == finite H \<and> generator R M H"
fGOver :: "[('a, 'r, 'm1) ModuleType_scheme, ('r, 'm)
RingType_scheme] \<Rightarrow> bool" (*(infixl 70)*)
"fGOver M R == \<exists>H. finite_generator R M H"
syntax
"@FGENOVER"::"[('a, 'r, 'm1) ModuleType_scheme, ('r, 'm)
RingType_scheme] \<Rightarrow> bool" (infixl "fgover" 70)
translations
"M fgover R" == "fGOver M R"
lemma h_in_linear_span:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M; h \<in> H\<rbrakk> \<Longrightarrow>
h \<in> linear_span R M (carrier R) H"
apply (subst sprod_one [THEN sym, of "R" "M" "h"], assumption+)
apply (simp add:subsetD)
apply (frule ring_one)
apply (rule elem_linear_span [of "R" "M" "carrier R" "H" "1\<^sub>R" "h"],
assumption+)
apply (simp add:whole_ideal) apply assumption+
done
lemma generator_sub_carrier:"\<lbrakk>ring R; R module M; generator R M H\<rbrakk> \<Longrightarrow>
H \<subseteq> carrier M"
apply (simp add:generator_def)
done
lemma lin_span_sub_carrier:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow>
linear_span R M A H \<subseteq> carrier M"
apply (rule subsetI)
apply (simp add:linear_span_def)
apply (case_tac "H = {}") apply simp
apply (simp add:module_inc_zero)
apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A.
x = linear_combination R M n s f \<longrightarrow> x \<in> carrier M")
apply blast apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def)
apply (rule_tac R = M and n = n and i = n in eSum_mem)
apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (simp add:n_in_Nsetn)
done
lemma lin_span_lin_span:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M\<rbrakk>\<Longrightarrow>
linear_span R M A H \<subseteq> linear_span R M (carrier R) H"
apply (rule subsetI)
apply (simp add:linear_span_def)
apply (case_tac "H = {}") apply simp apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> A.
x = linear_combination R M n s f \<longrightarrow> (\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> carrier R. x = linear_combination R M n s f)")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def)
apply (frule ideal_subset1 [of "R" "A"], assumption+)
apply (frule_tac f = s in extend_fun, assumption+)
apply blast
done
lemma lin_span_closedTr:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M\<rbrakk>\<Longrightarrow> \<forall>s. \<forall>f. s\<in>Nset n \<rightarrow> A \<and> f\<in> Nset n \<rightarrow> linear_span R M A H \<longrightarrow>(eSum M (\<lambda>j. s j \<star>\<^sub>M (f j)) n \<in> linear_span R M A H)"
apply (induct_tac n)
apply (rule allI)+ apply (rule impI) apply simp
apply (erule conjE) apply (subgoal_tac "0 \<in> Nset 0")
apply (rule submodule_sprod_closed, assumption+)
apply (rule linear_span_subModule, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem) apply (simp add:Nset_def)
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (frule func_pre [of _ _ "A"])
apply (frule func_pre [of _ _ "linear_span R M A H"])
apply simp
apply (rule submodule_pOp_closed, assumption+)
apply (rule linear_span_subModule, assumption+)
apply simp
apply (rule linear_span_sprod_closed, assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule_tac f = s and A = "Nset (Suc n)" and B = A and x = "Suc n" in
funcset_mem, assumption+) apply (simp add:ideal_subset)
apply (simp add:Nset_def)
apply (simp add:Nset_def funcset_mem)
done
lemma lin_span_closed:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M;
s \<in> Nset n \<rightarrow> A; f \<in> Nset n \<rightarrow> linear_span R M A H \<rbrakk> \<Longrightarrow>
linear_combination R M n s f \<in> linear_span R M A H"
apply (simp add:linear_combination_def)
apply (simp add:lin_span_closedTr)
done
lemma lin_span_closed1:"\<lbrakk>ring R; R module M; H \<subseteq> carrier M;
s \<in> Nset n \<rightarrow> carrier R; f \<in> Nset n \<rightarrow> linear_span R M (carrier R) H \<rbrakk> \<Longrightarrow>
e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n \<in> linear_span R M (carrier R) H"
apply (frule whole_ideal [of "R"])
apply (simp add:lin_span_closedTr)
done
lemma lin_span_closed2Tr:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M\<rbrakk> \<Longrightarrow>
s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow> linear_span R M (carrier R) H \<longrightarrow>
linear_combination R M n s f \<in> linear_span R M A H"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)+
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (simp add:linear_combination_def)
apply (subgoal_tac "0 \<in> Nset 0")
apply (frule_tac f = f and A = "Nset 0" and B = "{0\<^sub>M}" and x = 0 in
funcset_mem, assumption+)
apply simp
apply (rule sprod_a_0, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:Nset_def)
apply (subgoal_tac "0 \<in> Nset 0")
apply (frule_tac f = f and A = "Nset 0" and B = "linear_span R M (carrier R) H" and x = 0 in funcset_mem, assumption+)
apply (simp add:linear_combination_def)
apply (thin_tac "f \<in> Nset 0 \<rightarrow> linear_span R M (carrier R) H")
apply (simp add:linear_span_def [of _ _ "carrier R"])
apply (subgoal_tac "\<forall>n. \<forall>fa\<in>Nset n \<rightarrow> H. \<forall>t\<in>Nset n \<rightarrow> carrier R.
f 0 = linear_combination R M n t fa \<longrightarrow> s 0 \<star>\<^sub>M (f 0) \<in> linear_span R M A H")
apply blast
apply (thin_tac "\<exists>n. \<exists>fa\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> carrier R. f 0 = linear_combination R M n s fa")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def)
apply (frule_tac f = s and A = "Nset 0" and B = A and x = 0 in funcset_mem, assumption+)
apply (subst linear_span_sprod [of "R" "M" "carrier R" "H"], assumption+)
apply (simp add:whole_ideal) apply assumption
apply (simp add:ideal_subset) apply assumption+
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. s 0 \<star>\<^sub>M ( t k \<star>\<^sub>M (fa k))) n =
e\<Sigma> M (\<lambda>k. (s 0 \<cdot>\<^sub>R (t k)) \<star>\<^sub>M (fa k)) n")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>k. s 0 \<star>\<^sub>M (t k \<star>\<^sub>M (fa k))) n =
e\<Sigma> M (\<lambda>k. (s 0 \<cdot>\<^sub>R (t k)) \<star>\<^sub>M (fa k)) n")
apply (simp add:linear_span_def)
apply (simp add:linear_combination_def)
apply (subgoal_tac "(\<lambda>l\<in>Nset n. (s 0 \<cdot>\<^sub>R (t l))) \<in> Nset n \<rightarrow> A")
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. (s 0 \<cdot>\<^sub>R (t k)) \<star>\<^sub>M (fa k)) n =
e\<Sigma> M (\<lambda>k. (\<lambda>l\<in>Nset n. (s 0 \<cdot>\<^sub>R (t l))) k \<star>\<^sub>M (fa k)) n")
apply blast
apply (rule eSum_eq) apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test)
apply (rule ballI) apply simp
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply simp
apply (rule univar_func_test)
apply (rule ballI) apply simp
apply (frule_tac r = "t x" in ideal_ring_multiple[of "R" "A" "s 0"],
assumption+)
apply (simp add:funcset_mem)
apply (subst ring_tOp_commute, assumption+)
apply (simp add:ideal_subset) apply (simp add:funcset_mem)
apply assumption
apply (rule eSum_eq)
apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)+
apply (simp add:ideal_subset)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test)
apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:ideal_subset) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply (rule sprod_assoc [THEN sym], assumption+)
apply (simp add:ideal_subset) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD) apply (simp add:Nset_def)
apply (rule impI) apply (erule conjE)+
apply (frule func_pre [of _ _ "A"])
apply (frule func_pre [of _ _ "linear_span R M (carrier R) H"])
apply (subgoal_tac "linear_combination R M n s f \<in> linear_span R M A H")
apply (thin_tac "s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow>
linear_span R M (carrier R) H \<longrightarrow> linear_combination R M n s f \<in> linear_span R M A H")
apply (simp add:linear_combination_def)
apply (rule linear_span_tOp_closed, assumption+)
prefer 2 apply simp
apply (case_tac "H = {}")
apply (simp add:linear_span_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule_tac f = f and A = "Nset (Suc n)" and B = "{0\<^sub>M}" and x = "Suc n" in funcset_mem, assumption+) apply simp
apply (rule sprod_a_0, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:Nset_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (frule_tac f = f and A = "Nset (Suc n)" and B = "linear_span R M (carrier R) H" and x = "Suc n" in funcset_mem, assumption+)
apply (thin_tac "f \<in> Nset (Suc n) \<rightarrow> linear_span R M (carrier R) H")
apply (thin_tac "f \<in> Nset n \<rightarrow> linear_span R M (carrier R) H")
apply (thin_tac " e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n \<in> linear_span R M A H")
prefer 2 apply (simp add:Nset_def)
apply (simp add:linear_span_def [of "R" "M" "carrier R"])
apply (subgoal_tac "\<forall>na. \<forall>fa\<in>Nset na \<rightarrow> H. \<forall>t\<in>Nset na \<rightarrow> carrier R.
f (Suc n) = linear_combination R M na t fa \<longrightarrow> (s (Suc n) \<star>\<^sub>M (f (Suc n)) \<in> linear_span R M A H)") apply blast
apply (thin_tac "\<exists>na. \<exists>fa\<in>Nset na \<rightarrow> H. \<exists>s\<in>Nset na \<rightarrow> carrier R.
f (Suc n) = linear_combination R M na s fa")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def linear_span_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add: linear_span_sprod [of "R" "M" "carrier R" "H"] whole_ideal funcset_mem ideal_subset)
apply (subgoal_tac "(\<lambda>l\<in>Nset na. (s (Suc n)) \<cdot>\<^sub>R (t l)) \<in> Nset na \<rightarrow> A")
apply (subgoal_tac " e\<Sigma> M (\<lambda>k. s (Suc n) \<star>\<^sub>M ( t k \<star>\<^sub>M (fa k))) na =
e\<Sigma> M (\<lambda>j. (\<lambda>l\<in>Nset na. (s (Suc n)) \<cdot>\<^sub>R (t l)) j \<star>\<^sub>M (fa j)) na")
apply blast
apply (rule eSum_eq)
apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)+
apply (simp add:funcset_mem ideal_subset)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test)
apply (rule ballI) apply simp
apply (rule sprod_mem, assumption+)
apply (rule ring_tOp_closed, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem) apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply simp
apply (rule sprod_assoc [THEN sym], assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem)
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test)
apply (rule ballI) apply simp
apply (rule_tac x = "s (Suc n)" and r = "t x" in
ideal_ring_multiple1 [of "R" "A"], assumption+)
apply (simp add:funcset_mem)
apply (simp add:funcset_mem)
apply (simp add:Nset_def)
done
lemma lin_span_closed2:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M;
s \<in> Nset n \<rightarrow> A ; f \<in> Nset n \<rightarrow> linear_span R M (carrier R) H \<rbrakk> \<Longrightarrow>
linear_combination R M n s f \<in> linear_span R M A H"
apply (simp add:lin_span_closed2Tr)
done
lemma lin_span_closed3:"\<lbrakk>ring R; R module M; ideal R A; generator R M H;
A \<odot>\<^sub>R M = carrier M \<rbrakk> \<Longrightarrow> linear_span R M A H = carrier M"
apply (rule equalityI)
apply (rule subsetI)
apply (simp add:linear_span_def)
apply (case_tac "H = {}") apply simp apply (simp add:module_inc_zero)
apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H.
\<forall>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f \<longrightarrow> x \<in> carrier M")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply simp
apply (rule_tac s = s and m = f in linear_combination_mem [of "R" "M" "A" "H"], assumption+)
apply (simp add:generator_def) apply assumption+
apply (rule subsetI)
apply (simp add:generator_def)
apply (erule conjE)
apply (case_tac "H = {}") apply simp apply (simp add:linear_span_def)
apply (simp add:smodule_ideal_coeff_def)
apply (subgoal_tac "x \<in> linear_span R M A (carrier M)") prefer 2 apply simp
apply (thin_tac "linear_span R M A (carrier M) = carrier M")
apply (frule sym) apply (thin_tac "linear_span R M (carrier R) H = carrier M")
apply simp
apply (subgoal_tac "H \<subseteq> carrier M")
apply (thin_tac "carrier M = linear_span R M (carrier R) H")
apply (thin_tac "H \<subseteq> linear_span R M (carrier R) H")
apply (frule linear_span_inc_0 [of "R" "M" "carrier R" "H"], assumption+)
apply (simp add:whole_ideal) apply assumption+
apply (frule nonempty [of "0\<^sub>M" "linear_span R M (carrier R) H"])
apply (simp add:linear_span_def [of _ _ _ "linear_span R M (carrier R) H"])
prefer 2 apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> linear_span R M (carrier R) H.
\<forall>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f \<longrightarrow> x \<in> linear_span R M A H")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> linear_span R M (carrier R) H.
\<exists>s\<in>Nset n \<rightarrow> A. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+
apply (rule impI)
apply simp
apply (simp add:lin_span_closed2)
done
lemma generator_generator:"\<lbrakk>ring R; R module M; generator R M H;
H1 \<subseteq> carrier M; H \<subseteq> linear_span R M (carrier R) H1 \<rbrakk> \<Longrightarrow> generator R M H1"
apply (subst generator_def)
apply (frule generator_sub_carrier [of "R" "M" "H"], assumption+)
apply simp
apply (rule equalityI)
apply (rule subsetI)
apply (thin_tac "H \<subseteq> linear_span R M (carrier R) H1")
apply (simp add:linear_span_def)
apply (case_tac "H1 = {}") apply simp
apply (rule module_inc_zero, assumption+) apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H1. \<forall>s\<in>Nset n \<rightarrow> carrier R.
x = linear_combination R M n s f \<longrightarrow> x \<in> carrier M")
apply blast
apply (thin_tac "\<exists>n. \<exists>f\<in>Nset n \<rightarrow> H1.
\<exists>s\<in>Nset n \<rightarrow> carrier R. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply simp apply (thin_tac "x = linear_combination R M n s f")
apply (simp add:linear_combination_def)
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (rule_tac R = M and f = "\<lambda>j. s j \<star>\<^sub>M (f j)" and n = n and i = n in
eSum_mem, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem) apply (simp add:funcset_mem subsetD)
apply (simp add:Nset_def)
apply (rule subsetI)
apply (simp add:generator_def)
apply (subgoal_tac "x \<in> linear_span R M (carrier R) H")
apply (thin_tac "linear_span R M (carrier R) H = carrier M")
apply (simp add:linear_span_def [of "R" "M" _ "H"])
apply (case_tac "H = {}") apply simp apply (rule linear_span_inc_0, assumption+) apply (simp add:whole_ideal) apply assumption+ apply simp
prefer 2 apply simp
apply (subgoal_tac "\<forall>n. \<forall>f\<in>Nset n \<rightarrow> H. \<forall>s\<in>Nset n \<rightarrow> carrier R. x = linear_combination R M n s f \<longrightarrow> x \<in> linear_span R M (carrier R) H1")
apply blast
apply (thin_tac " \<exists>n. \<exists>f\<in>Nset n \<rightarrow> H.
\<exists>s\<in>Nset n \<rightarrow> carrier R. x = linear_combination R M n s f")
apply (rule allI) apply (rule ballI)+ apply (rule impI)
apply (simp add:linear_combination_def)
apply (rule_tac s = s and n = n and f = f in lin_span_closed1 [of "R" "M" "H1"], assumption+)
apply (rule extend_fun, assumption+)
done
lemma generator_generator_decTr:"\<lbrakk>ring R; R module M\<rbrakk> \<Longrightarrow>
f \<in> Nset n \<rightarrow> carrier M \<and> generator R M (f ` Nset n) \<and> (\<forall>i\<in>nset (Suc 0) n. f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))) \<longrightarrow> linear_span R M (carrier R) {f 0} = carrier M"
apply (induct_tac n)
apply (rule impI) apply (erule conjE)+
apply (subgoal_tac "f ` Nset 0 = {f 0}") apply simp
apply (thin_tac " \<forall>i\<in>nset (Suc 0) 0.
f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))")
apply (thin_tac "f ` Nset 0 = {f 0}")
apply (simp add:generator_def)
apply (simp add:Nset_def)
apply (rule impI)
apply (erule conjE)+
apply (frule func_pre [of _ _ "carrier M"])
apply (subgoal_tac "f (Suc n) \<in> linear_span R M (carrier R) (f ` (Nset n))")
apply (subgoal_tac "generator R M (f ` Nset n)")
apply (subgoal_tac "\<forall>i\<in>nset (Suc 0) n.
f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))")
apply blast
apply (thin_tac " f \<in> Nset n \<rightarrow> carrier M \<and>
generator R M (f ` Nset n) \<and>
(\<forall>i\<in>nset (Suc 0) n.
f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))) \<longrightarrow>
linear_span R M (carrier R) {f 0} = carrier M")
apply (rule ballI)
apply (subgoal_tac "i \<in> nset (Suc 0) (Suc n)") apply simp
apply (simp add:nset_def)
apply (frule_tac H = "f ` (Nset (Suc n))" and ?H1.0 = "f ` (Nset n)"in generator_generator [of "R" "M"], assumption+)
apply (rule_tac f = f and A = "Nset n" and B = "carrier M" and ?A1.0 = "Nset n" in image_sub, assumption+) apply simp
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (rule subsetI) apply (simp add:Nset_def)
apply (rule subsetI) apply (simp add:Nset_def)
apply (rule subsetI) apply simp
apply (case_tac "x = f (Suc n)") apply simp apply simp
apply (rule h_in_linear_span, assumption+)
apply (rule_tac f = f and A = "Nset n" and B = "carrier M" and ?A1.0 = "Nset n" in image_sub, assumption+) apply simp apply assumption+
apply (thin_tac " f \<in> Nset n \<rightarrow> carrier M \<and> generator R M (f ` Nset n) \<and>
(\<forall>i\<in>nset (Suc 0) n. f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))) \<longrightarrow> linear_span R M (carrier R) {f 0} = carrier M")
apply (subgoal_tac "Suc n \<in> nset (Suc 0) (Suc n)")
apply (subgoal_tac "f (Suc n) \<in> linear_span R M (carrier R)
(f ` Nset (Suc n - Suc 0))") apply simp
apply blast
apply (simp add:nset_def)
done
lemma generator_generator_dec:"\<lbrakk>ring R; R module M; f \<in> Nset n \<rightarrow> carrier M;
generator R M (f ` Nset n); (\<forall>i\<in>nset (Suc 0) n. f i \<in> linear_span R M (carrier R) (f ` Nset (i - Suc 0))) \<rbrakk> \<Longrightarrow> linear_span R M (carrier R) {f 0} = carrier M"
apply (simp add:generator_generator_decTr [of "R" "M" "f" "n"])
done
lemma surjec_generator:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N;
surjec\<^sub>M\<^sub>,\<^sub>N f; generator R M H\<rbrakk> \<Longrightarrow> generator R N (f ` H)"
apply (simp add:generator_def) apply (erule conjE)
apply (simp add:surjec_def) apply (erule conjE)+
apply (simp add:aHom_def) apply (erule conjE)+
apply (simp add:image_sub [of "f" "carrier M" "carrier N" "H"])
apply (frule lin_span_sub_carrier [of "R" "carrier R" "N" "f ` H"])
apply (simp add:whole_ideal) apply assumption
apply (simp add:image_sub [of "f" "carrier M" "carrier N" "H"])
apply (rule equalityI, assumption+)
apply (rule subsetI)
apply (simp add:surj_to_def)
apply (subgoal_tac "x \<in> f ` carrier M") prefer 2 apply simp
apply (thin_tac "f ` carrier M = carrier N")
apply (simp add:image_def)
apply (thin_tac "\<forall>a\<in>carrier M. \<forall>b\<in>carrier M. f ( a +\<^sub>M b) = f a +\<^sub>N (f b)")
apply (subgoal_tac "\<forall>xa\<in>carrier M. x = f xa \<longrightarrow>
x \<in> linear_span R N (carrier R) {y. \<exists>x\<in>H. y = f x}")
apply blast apply (thin_tac "\<exists>xa\<in>carrier M. x = f xa")
apply (rule ballI) apply (rule impI) apply (fold image_def)
apply (subgoal_tac "xa \<in> linear_span R M (carrier R) H")
prefer 2 apply simp
apply (thin_tac "linear_span R M (carrier R) H = carrier M")
apply (thin_tac "f \<in> extensional (carrier M)")
apply (simp add:linear_span_def [of "R" "M"])
apply (case_tac "H = {}") apply (simp add:linear_span_def)
apply (simp add:mHom_0) apply simp
apply auto
apply (subgoal_tac "f (linear_combination R M n s fa) \<in> linear_span R N (carrier R) (f ` H)") apply simp
apply (thin_tac "f (linear_combination R M n s fa) \<notin> linear_span R N (carrier R) (f ` H)")
apply (rule linmap_im_linspan, assumption+ )
apply (rule whole_ideal, assumption+)
done
lemma surjec_finitely_gen:"\<lbrakk>ring R; R module M; R module N; f \<in> mHom R M N;
surjec\<^sub>M\<^sub>,\<^sub>N f; M fgover R\<rbrakk> \<Longrightarrow> N fgover R"
apply (simp add:fGOver_def)
apply (subgoal_tac "\<forall>H. finite_generator R M H \<longrightarrow> (\<exists>H. finite_generator R N H)") apply blast apply (thin_tac "\<exists>H. finite_generator R M H")
apply (rule allI) apply (rule impI)
apply (simp add:finite_generator_def [of "R" "M"]) apply (erule conjE)
apply (frule_tac H = H in surjec_generator[of "R" "M" "N" "f"], assumption+)
apply (simp add:finite_generator_def [of "R" "N"])
apply (frule_tac F = H and h = f in finite_imageI)
apply blast
done
subsection "4-1. sum up coefficients "
text{* Symbolic calculation. *}
lemma similar_termTr:"\<lbrakk>ring R; ideal R A; R module M; a \<in> A\<rbrakk> \<Longrightarrow>
\<forall>s. \<forall>f. s\<in>Nset n \<rightarrow> A \<and> f\<in> Nset n \<rightarrow> carrier M \<and> m \<in> f ` (Nset n) \<longrightarrow>(\<exists>t\<in>Nset n \<rightarrow> A. eSum M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M m = eSum M (\<lambda>j. t j \<star>\<^sub>M (f j)) n )"
apply (induct_tac n)
apply (rule allI)+ apply (rule impI) apply (erule conjE)+
apply (simp add:Nset_def)
apply (subgoal_tac "(0::nat) \<in> {0}")
apply (frule_tac a = "s 0" and b = a and m = "f 0" in sprod_distrib1 [of "R" "M"], assumption+)
apply (simp add:funcset_mem) apply (simp add:funcset_mem ideal_subset)
apply (simp add:ideal_subset)
apply (simp add:funcset_mem) apply (rotate_tac -1)
apply (frule sym) apply (thin_tac "(s 0 +\<^sub>R a) \<star>\<^sub>M (f 0) = s 0 \<star>\<^sub>M (f 0) +\<^sub>M a \<star>\<^sub>M (f 0)")
apply (subgoal_tac "(\<lambda>k\<in>Nset 0. (s 0 +\<^sub>R a)) \<in> {0} \<rightarrow> A")
apply (subgoal_tac "s 0 \<star>\<^sub>M (f 0) +\<^sub>M a \<star>\<^sub>M (f 0)
= ((\<lambda>k\<in>Nset 0. s 0 +\<^sub>R a) 0) \<star>\<^sub>M (f 0)")
apply (thin_tac " s 0 \<star>\<^sub>M (f 0) +\<^sub>M a \<star>\<^sub>M (f 0) = ( s 0 +\<^sub>R a) \<star>\<^sub>M (f 0)")
apply blast
apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (rule ideal_pOp_closed, assumption+)
apply (subgoal_tac "(0::nat) \<in> {0}")
apply (simp add:funcset_mem) apply simp apply assumption apply simp
(** n **)
apply (rule allI)+ apply (rule impI) apply (erule conjE)+
apply (simp del:eSum_Suc add:image_def)
apply (subgoal_tac "\<forall>x\<in>Nset (Suc n). m = f x \<longrightarrow> (\<exists>t\<in>Nset (Suc n) \<rightarrow>
A. e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) (Suc n) +\<^sub>M a \<star>\<^sub>M m =
e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) (Suc n))")
apply (thin_tac "\<forall>s f. s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow> carrier M \<and>
(\<exists>x\<in>Nset n. m = f x) \<longrightarrow> (\<exists>t\<in>Nset n \<rightarrow> A.
e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M m = e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n)")
apply blast
apply (thin_tac "\<exists>x\<in>Nset (Suc n). m = f x")
apply (rule ballI) apply (rule impI)
apply (case_tac "x = Suc n") (***** case x = Suc n ********)
apply (thin_tac "\<forall>s f. s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow> carrier M \<and>
(\<exists>x\<in>Nset n. m = f x) \<longrightarrow> (\<exists>t\<in>Nset n \<rightarrow> A.
e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M m = e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n)")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subgoal_tac "(\<lambda>j. s j \<star>\<^sub>M (f j)) \<in> Nset n \<rightarrow> carrier M")
apply (frule_tac n = n and i = n and f = "\<lambda>j. s j \<star>\<^sub>M (f j)" in
eSum_mem [of "M"], assumption+)
apply (simp add:Nset_def) apply simp
apply (frule_tac a = "s (Suc n)" and m = "f (Suc n)" in sprod_mem [of "R" "M"], assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:funcset_mem)
apply (frule_tac a = a and m = "f (Suc n)" in sprod_mem [of "R" "M"], assumption+) apply (simp add:ideal_subset) apply (simp add:funcset_mem)
apply (frule_tac a = "s (Suc n)" and b = a and m = "f (Suc n)" in
sprod_distrib1 [of "R" "M"], assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:ideal_subset)
apply (simp add:funcset_mem)
apply (rotate_tac -1) apply (frule sym)
apply (thin_tac "(s (Suc n) +\<^sub>R a) \<star>\<^sub>M (f (Suc n)) =
s (Suc n) \<star>\<^sub>M (f (Suc n)) +\<^sub>M a \<star>\<^sub>M (f (Suc n))")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_pOp_assoc, assumption+) apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n \<in> carrier M")
apply (thin_tac "s (Suc n) \<star>\<^sub>M (f (Suc n)) \<in> carrier M")
apply (thin_tac "a \<star>\<^sub>M (f (Suc n)) \<in> carrier M")
apply (thin_tac "s (Suc n) \<star>\<^sub>M (f (Suc n)) +\<^sub>M a \<star>\<^sub>M (f (Suc n)) =
( s (Suc n) +\<^sub>R a) \<star>\<^sub>M (f (Suc n))")
apply (subgoal_tac "jointfun n s 0 (\<lambda>l. ( s (Suc n) +\<^sub>R a))
\<in> Nset (Suc n) \<rightarrow> A")
apply (subgoal_tac "
e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M ( s (Suc n) +\<^sub>R a) \<star>\<^sub>M (f (Suc n)) =
eSum M (\<lambda>k. (jointfun n s 0 (\<lambda>l. ( s (Suc n) +\<^sub>R a))) k \<star>\<^sub>M (f k)) (Suc n)")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M ((s (Suc n) +\<^sub>R a) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>k. (jointfun n s 0 (\<lambda>l. s (Suc n) +\<^sub>R a)) k \<star>\<^sub>M (f k)) n +\<^sub>M
((jointfun n s 0 (\<lambda>l. s (Suc n) +\<^sub>R a)) (Suc n) \<star>\<^sub>M (f (Suc n)))")
apply blast
apply (simp add:jointfun_def Nset_def)
apply (subgoal_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n =
e\<Sigma> M (\<lambda>k. (if k \<le> n then s k else s (Suc n) +\<^sub>R a) \<star>\<^sub>M (f k)) n ")
apply simp
apply (rule eSum_eq, assumption+) apply (rule univar_func_test)
apply (rule ballI) apply (rule sprod_mem, assumption+)
apply (simp add:Nset_def funcset_mem ideal_subset) apply (simp add:Nset_def funcset_mem)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (rule sprod_mem, assumption+) apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem)
apply (rule ballI) apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:Nset_def jointfun_def)
apply (case_tac "xa \<le> n") apply simp apply (simp add:funcset_mem)
apply simp
apply (rule ideal_pOp_closed, assumption+)
apply (simp add:funcset_mem) apply assumption
apply (rule univar_func_test)
apply (rule ballI) apply (rule sprod_mem, assumption+)
apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem)
apply (frule Nset_pre, assumption+)
apply (frule func_pre [of _ _ "A"])
apply (frule func_pre [of _ _ "carrier M"])
apply (subgoal_tac "\<exists>x\<in>Nset n. m = f x") prefer 2 apply blast
apply (subgoal_tac "\<exists>t\<in>Nset n \<rightarrow> A.
e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M m = e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n")
prefer 2 apply simp apply (thin_tac "\<exists>x\<in>Nset n. m = f x")
apply (thin_tac "\<forall>s f. s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow> carrier M \<and> (\<exists>x\<in>Nset n. m = f x) \<longrightarrow> (\<exists>t\<in>Nset n \<rightarrow> A. e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M (a \<star>\<^sub>M m) = e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n)")
apply auto
apply (frule_tac s = s and n = n and m = f in linear_combination_mem [of "R" "M" "A" "carrier M"], assumption+)
apply simp apply assumption+
apply (simp add:linear_combination_def)
apply (subgoal_tac "s (Suc n) \<star>\<^sub>M (f (Suc n)) \<in> carrier M")
apply (subgoal_tac "a \<star>\<^sub>M (f x) \<in> carrier M")
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_pOp_assoc, assumption+)
apply (frule_tac x = "s (Suc n) \<star>\<^sub>M (f (Suc n))" and y = "a \<star>\<^sub>M (f x)" in
ag_pOp_commute [of "M"], assumption+) apply simp
apply (subst ag_pOp_assoc [THEN sym], assumption+)
apply (thin_tac "s (Suc n) \<star>\<^sub>M (f (Suc n)) +\<^sub>M a \<star>\<^sub>M (f x) =
a \<star>\<^sub>M (f x) +\<^sub>M (s (Suc n) \<star>\<^sub>M (f (Suc n)))")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M (f x)
= e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n")
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n \<in> carrier M")
apply (thin_tac "s (Suc n) \<star>\<^sub>M (f (Suc n)) \<in> carrier M")
apply (thin_tac "a \<star>\<^sub>M (f x) \<in> carrier M")
apply (subgoal_tac "jointfun n t 0 (\<lambda>j. s (Suc n)) \<in> Nset (Suc n) \<rightarrow> A")
apply (subgoal_tac "e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n +\<^sub>M (s (Suc n) \<star>\<^sub>M (f (Suc n))) =
e\<Sigma> M (\<lambda>j. (jointfun n t 0 (\<lambda>j. s (Suc n))) j \<star>\<^sub>M (f j)) n +\<^sub>M
((jointfun n t 0 (\<lambda>j. s (Suc n))) (Suc n) \<star>\<^sub>M (f (Suc n)))")
apply simp
apply blast
apply (simp add:Nset_def jointfun_def)
apply (subgoal_tac "e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n =
e\<Sigma> M (\<lambda>j. (if j \<le> n then t j else s (Suc n)) \<star>\<^sub>M (f j)) n") apply simp
apply (rule eSum_eq) apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+) apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:Nset_def funcset_mem)
apply (rule sprod_mem, assumption+) apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem)
apply (rule ballI) apply (simp add:Nset_def)
apply (subgoal_tac "(\<lambda>j. s (Suc n)) \<in> Nset 0 \<rightarrow> A")
apply (frule_tac f = t and n = n and A = A and g = "\<lambda>j. s (Suc n)"
and m = 0 and B = A in jointfun_hom, assumption+)
apply simp
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def funcset_mem ideal_subset)
apply (rule sprod_mem, assumption+) apply (simp add:ideal_subset)
apply (simp add:Nset_def funcset_mem)
apply (rule sprod_mem, assumption+)
apply (simp add:Nset_def funcset_mem ideal_subset)
apply (simp add:Nset_def funcset_mem)
done
lemma similar_term1:"\<lbrakk>ring R; ideal R A; R module M; a \<in> A;s\<in>Nset n \<rightarrow> A; f\<in> Nset n \<rightarrow> carrier M; m \<in> f ` (Nset n) \<rbrakk> \<Longrightarrow>
\<exists>t\<in>Nset n \<rightarrow> A. e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n +\<^sub>M a \<star>\<^sub>M m =
e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (f j)) n"
apply (simp add:similar_termTr)
done
lemma same_togetherTr:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M \<rbrakk> \<Longrightarrow> \<forall>s. \<forall>f. s\<in>Nset n \<rightarrow> A \<and> f\<in> Nset n \<rightarrow> H \<longrightarrow> (\<exists>t \<in> Nset (card (f ` (Nset n)) - Suc 0) \<rightarrow> A. \<exists>g\<in> Nset (card (f ` (Nset n)) - Suc 0) \<rightarrow> f ` (Nset n). surj_to g (Nset (card (f ` (Nset n)) - Suc 0)) (f ` (Nset n)) \<and> eSum M (\<lambda>j. s j \<star>\<^sub>M (f j)) n = eSum M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` (Nset n)) - Suc 0))"
apply (induct_tac n)
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (simp add:Nset_def)
apply (subgoal_tac "f \<in> {0::nat} \<rightarrow> {f 0}")
apply (subgoal_tac "surj_to f {0::nat} {f 0}")
apply blast
apply (simp add:surj_to_def)
apply (rule univar_func_test) apply (rule ballI) apply simp
apply (rule allI)+ apply (rule impI) apply (erule conjE)
apply (frule func_pre [of _ _ "A"])
apply (frule func_pre [of _ _ "H"])
apply (subgoal_tac "\<exists>t\<in>Nset (card (f ` Nset n) - Suc 0) \<rightarrow> A.
\<exists>g\<in>Nset (card (f ` Nset n) - Suc 0) \<rightarrow> f ` Nset n. surj_to g (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n)\<and> e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n = e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0)")
prefer 2 apply simp
apply (thin_tac "\<forall>s f. s \<in> Nset n \<rightarrow> A \<and> f \<in> Nset n \<rightarrow> H \<longrightarrow>
(\<exists>t\<in>Nset (card (f ` Nset n) - Suc 0) \<rightarrow> A.
\<exists>g\<in>Nset (card (f ` Nset n) - Suc 0) \<rightarrow> f ` Nset n. surj_to g (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n) \<and> e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n =
e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0))")
apply (subgoal_tac "\<forall>t\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> A.
\<forall>g\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> f ` Nset n. surj_to g (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n) \<and> e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n = e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0) \<longrightarrow> (\<exists>t\<in>Nset (card (f ` Nset (Suc n)) - (Suc 0)) \<rightarrow> A. \<exists>g\<in>Nset (card (f ` Nset (Suc n)) - (Suc 0)) \<rightarrow> f ` Nset (Suc n). surj_to g (Nset (card (f ` Nset (Suc n)) - Suc 0)) (f ` Nset (Suc n)) \<and> e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) (Suc n) =
e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset (Suc n)) - (Suc 0)))")
apply blast
apply (thin_tac "\<exists>t\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> A.
\<exists>g\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> f ` Nset n. surj_to g (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n) \<and> e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n = e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0)")
apply (rule ballI)+ apply (rule impI) apply (erule conjE)
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) n =
e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0)")
apply (case_tac "f (Suc n) \<in> g ` (Nset (card (f ` Nset n) - Suc 0))")
apply (subgoal_tac "f ` (Nset (Suc n)) = f ` (Nset n)") apply simp
apply (frule_tac a = "s (Suc n)" and s = t and n = "card (f ` Nset n) - Suc 0" and f = g and m = "f (Suc n)" in similar_term1 [of "R" "A" "M"], assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem) apply (simp add:Nset_def)
apply assumption
apply (frule_tac f = f and A = "Nset n" and ?A1.0 = "Nset n" in
image_sub) apply simp
apply (rule extend_fun, assumption+)
apply (rule subset_trans, assumption+)
apply (subgoal_tac "\<forall>ta\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (g j)) (card (f ` Nset n) - (Suc 0)) +\<^sub>M (s (Suc n) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>j. ta j \<star>\<^sub>M (g j)) (card (f ` Nset n) - (Suc 0)) \<longrightarrow> (\<exists>ta\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> A. \<exists>ga\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> f ` Nset n. surj_to ga (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n) \<and> e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - (Suc 0)) +\<^sub>M (s (Suc n) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>k. ta k \<star>\<^sub>M (ga k)) (card (f ` Nset n) - (Suc 0)))")
apply (thin_tac "f ` Nset (Suc n) = f ` Nset n")
apply (thin_tac "f (Suc n) \<in> g ` Nset (card (f ` Nset n) - Suc 0)")
apply (thin_tac "surj_to g (Nset (card (f ` Nset n) - Suc 0)) (f ` Nset n)")
apply (thin_tac "g \<in> Nset (card (f ` Nset n) - Suc 0) \<rightarrow> f ` Nset n")
apply (thin_tac "t \<in> Nset (card (f ` Nset n) - Suc 0) \<rightarrow> A")
apply blast
apply (thin_tac "\<exists>ta\<in>Nset (card (f ` Nset n) - (Suc 0)) \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (g j)) (card (f ` Nset n) - (Suc 0)) +\<^sub>M (s (Suc n) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>j. ta j \<star>\<^sub>M (g j)) (card (f ` Nset n) - (Suc 0))")
apply (rule ballI) apply (rule impI) apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (g j)) (card (f ` Nset n) - Suc 0) +\<^sub>M
(s (Suc n) \<star>\<^sub>M (f (Suc n))) =
e\<Sigma> M (\<lambda>j. ta j \<star>\<^sub>M (g j)) (card (f ` Nset n) - Suc 0)")
apply blast
apply (rule equalityI)
apply (subst Nset_un)
apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply (frule_tac f = g and A = "Nset (card (f ` Nset n) - Suc 0)" and ?A1.0 = "Nset (card (f ` Nset n) - Suc 0)" in image_sub) apply simp
apply (simp add:subsetD)
apply (subgoal_tac "Nset n \<subseteq> Nset (Suc n)")
apply (rule_tac f = f and A = "Nset (Suc n)" and B = H and
?A1.0 = "Nset n" and ?A2.0 = "Nset (Suc n)" in im_set_mono, assumption+)
apply simp apply (simp add:Nsetn_sub)
apply (simp add:surj_to_def)
apply (subgoal_tac "jointfun (card (f ` Nset n) - Suc 0) t 0 (\<lambda>l\<in>Nset 0. s (Suc n)) \<in> Nset (card (f ` Nset (Suc n)) - Suc 0) \<rightarrow> A")
apply (subgoal_tac "jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)) \<in> Nset (card (f ` Nset (Suc n)) - Suc 0) \<rightarrow> f ` (Nset (Suc n))")
apply (subgoal_tac "(jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n))) ` (Nset (card (f ` Nset (Suc n)) - Suc 0)) = f ` Nset (Suc n)")
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0) +\<^sub>M
(s (Suc n) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>k. (jointfun (card (f ` Nset n) - Suc 0) t 0 (\<lambda>l\<in>Nset 0. s (Suc n))) k \<star>\<^sub>M (((jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)))) k)) (card (f ` Nset (Suc n)) - Suc 0)")
apply simp
apply (thin_tac "e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0) +\<^sub>M
(s (Suc n) \<star>\<^sub>M (f (Suc n))) = e\<Sigma> M (\<lambda>k. (jointfun (card (f ` Nset n) - Suc 0) t 0 (\<lambda>l\<in>Nset 0. s (Suc n))) k \<star>\<^sub>M (((jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)))) k)) (card (f ` Nset (Suc n)) - Suc 0)")
apply blast
apply (subgoal_tac "card (f ` Nset (Suc n)) - Suc 0 = Suc (card (f ` Nset n) - Suc 0)") apply simp
apply (subgoal_tac "(jointfun (card (f ` Nset n) - Suc 0) t 0
(\<lambda>l\<in>Nset 0. s (Suc n))) (Suc (card (f ` Nset n) - Suc 0)) \<star>\<^sub>M ((jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)))
(Suc (card (f ` Nset n) - Suc 0))) = s (Suc n) \<star>\<^sub>M (f (Suc n))")
prefer 2 apply (simp add:jointfun_def slide_def sliden_def)
apply (simp add:Nset_def) apply simp
apply (thin_tac "(jointfun (card (f ` Nset n) - Suc 0) t 0
(\<lambda>l\<in>Nset 0. s (Suc n))) (Suc (card (f ` Nset n) - Suc 0)) \<star>\<^sub>M ((jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)))
(Suc (card (f ` Nset n) - Suc 0))) = s (Suc n) \<star>\<^sub>M (f (Suc n))")
apply (subgoal_tac "e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset n) - Suc 0)
= e\<Sigma> M (\<lambda>k. (jointfun (card (f ` Nset n) - Suc 0) t 0 (\<lambda>l\<in>Nset 0. s (Suc n)))
k \<star>\<^sub>M ((jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n))) k)) (card (f ` Nset n) - Suc 0)") apply simp
apply (rule eSum_eq) apply (simp add:module_is_ag)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem ideal_subset)
apply (frule_tac f = f and A = "Nset n" and B = H and
?A1.0 = "Nset n" in image_sub) apply simp
apply (simp add:funcset_mem subsetD)
apply (rule univar_func_test) apply (rule ballI)
apply (subgoal_tac "x \<le> card (f ` Nset n) - Suc 0")
apply (simp add:jointfun_def)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem ideal_subset)
apply (frule_tac f = f and A = "Nset n" and B = H and
?A1.0 = "Nset n" in image_sub) apply simp
apply (simp add:funcset_mem subsetD) apply (simp add:Nset_def)
apply (rule ballI)
apply (subgoal_tac "l \<le> card (f ` Nset n) - Suc 0")
apply (simp add:jointfun_def) apply (simp add:Nset_def)
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply simp apply (subst card_insert_disjoint)
apply (rule finite_imageI) apply (simp add:finite_Nset) apply assumption
apply (subgoal_tac "0 < card (f ` Nset n)") apply simp
apply (rule nonempty_card_pos)
apply (rule finite_imageI) apply (simp add:finite_Nset)
apply (subgoal_tac "f 0 \<in> f ` Nset n") apply (simp add:nonempty)
apply (subgoal_tac "0 \<in> Nset n") apply (simp add:nonempty)
apply (simp add:Nset_def) apply (subgoal_tac "0 \<in> Nset n")
apply (simp add:mem_in_image) apply (simp add:Nset_def)
apply (subgoal_tac "(\<lambda>l\<in>Nset 0. f (Suc n)) \<in> Nset 0 \<rightarrow> {f (Suc n)}")
apply (frule_tac f = g and n = "card (f ` Nset n) - Suc 0" and A = "f ` Nset n" and g = "\<lambda>l\<in>Nset 0. f (Suc n)" and m = 0 and B = "{f (Suc n)}" in im_jointfun, assumption+)
apply simp apply (subgoal_tac "Nset (Suc (card (f ` Nset n) - Suc 0)) =
Nset (card (f ` Nset (Suc n)) - Suc 0)") apply simp
apply (subgoal_tac "(\<lambda>l\<in>Nset 0. f (Suc n)) ` Nset 0 = {f (Suc n)}")
apply simp apply (subst Nset_un)
apply (subst im_set_un, assumption+) apply (simp add:Nsetn_sub)
apply (rule subsetI) apply (simp add:Nset_def) apply simp
apply (simp add:image_def) apply (rule equalityI) apply (rule subsetI)
apply (simp add:CollectI) apply (rule subsetI) apply (simp add:CollectI)
apply (simp add:Nset_def)
apply (thin_tac "jointfun (card (f ` Nset n) - Suc 0) t 0 (\<lambda>l\<in>Nset 0. s (Suc n)) \<in> Nset (card (f ` Nset (Suc n)) - Suc 0) \<rightarrow> A")
apply (thin_tac "jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0. f (Suc n)) \<in> Nset (card (f ` Nset (Suc n)) - Suc 0) \<rightarrow> f ` Nset (Suc n)")
apply (thin_tac "jointfun (card (f ` Nset n) - Suc 0) g 0 (\<lambda>l\<in>Nset 0.
f (Suc n)) ` Nset (Suc (card (f ` Nset n) - Suc 0)) =
f ` Nset n \<union> (\<lambda>l. f (Suc n)) ` Nset 0")
apply (subgoal_tac "Suc (card (f ` Nset n) - Suc 0) = card (f ` Nset (Suc n)) - Suc 0") apply simp
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply simp apply (subst card_insert_disjoint) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply assumption
apply (subgoal_tac "0 < card (f ` Nset n)") apply simp
apply (rule nonempty_card_pos) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply (subgoal_tac "f 0 \<in> f ` Nset n")
apply (simp add:nonempty) apply (subgoal_tac "0 \<in> Nset n")
apply (simp add:nonempty) apply (simp add:Nset_def)
apply (subgoal_tac "0 \<in> Nset n") apply (simp add:mem_in_image)
apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (frule_tac f = g and n = "card (f ` Nset n) - Suc 0" and
A = "f ` Nset n" and g = "\<lambda>l\<in>Nset 0. f (Suc n)" and m = 0 and B = "{f (Suc n)}" in jointfun_hom0)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply simp
apply (subgoal_tac "Nset (Suc (card (f ` Nset n) - Suc 0)) =
Nset (card (f ` Nset (Suc n)) - Suc 0)") apply simp
apply (subgoal_tac "insert (f (Suc n)) (f ` Nset n) = f ` (Nset (Suc n))")
apply simp
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply simp
apply (subgoal_tac "Suc (card (f ` Nset n) - Suc 0) = card (f ` Nset (Suc n)) - Suc 0") apply simp
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply simp apply (subst card_insert_disjoint) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply assumption
apply (subgoal_tac "0 < card (f ` Nset n)") apply simp
apply (rule nonempty_card_pos) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply (subgoal_tac "f 0 \<in> f ` Nset n")
apply (simp add:nonempty) apply (subgoal_tac "0 \<in> Nset n")
apply (simp add:nonempty) apply (simp add:Nset_def)
apply (subgoal_tac "0 \<in> Nset n") apply (simp add:mem_in_image)
apply (simp add:Nset_def)
apply (frule_tac f = t and n = "card (f ` Nset n) - Suc 0" and
A = A and g = "\<lambda>l\<in>Nset 0. s (Suc n)" and m = 0 and B = A in jointfun_hom0)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (simp add:funcset_mem) apply simp
apply (subgoal_tac "Nset (Suc (card (f ` Nset n) - Suc 0)) =
Nset (card (f ` Nset (Suc n)) - Suc 0)") apply simp
apply (subgoal_tac "Suc (card (f ` Nset n) - Suc 0) = card (f ` Nset (Suc n)) - Suc 0") apply simp
apply (subst Nset_un) apply (subst im_set_un, assumption+)
apply (simp add:Nsetn_sub) apply (rule subsetI) apply (simp add:Nset_def)
apply simp apply (subst card_insert_disjoint) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply assumption
apply (subgoal_tac "0 < card (f ` Nset n)") apply simp
apply (rule nonempty_card_pos) apply (rule finite_imageI)
apply (simp add:finite_Nset) apply (subgoal_tac "f 0 \<in> f ` Nset n")
apply (simp add:nonempty) apply (subgoal_tac "0 \<in> Nset n")
apply (simp add:nonempty) apply (simp add:Nset_def)
apply (subgoal_tac "0 \<in> Nset n") apply (simp add:mem_in_image)
apply (simp add:Nset_def)
done
(* H shall be a generator *)
lemma same_together:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M; s \<in> Nset n \<rightarrow> A; f \<in> Nset n \<rightarrow> H\<rbrakk> \<Longrightarrow> \<exists>t \<in> Nset (card (f ` (Nset n)) - Suc 0) \<rightarrow> A. \<exists>g\<in> Nset (card (f ` (Nset n)) - Suc 0) \<rightarrow> f ` (Nset n). surj_to g (Nset (card (f ` (Nset n)) - Suc 0)) (f ` (Nset n)) \<and> eSum M (\<lambda>j. s j \<star>\<^sub>M (f j)) n = eSum M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` (Nset n)) - Suc 0)"
apply (simp add:same_togetherTr)
done
lemma one_last:"\<lbrakk>ring R; ideal R A; R module M; H \<subseteq> carrier M; s \<in> Nset (Suc n) \<rightarrow> A; f \<in> Nset (Suc n) \<rightarrow> H; bij_to f (Nset (Suc n)) H; j \<in> Nset (Suc n); j \<noteq> (Suc n)\<rbrakk> \<Longrightarrow> \<exists>t\<in> Nset (Suc n) \<rightarrow> A. \<exists>g\<in> Nset (Suc n) \<rightarrow> H. eSum M (\<lambda>k. s k \<star>\<^sub>M (f k)) (Suc n) = eSum M (\<lambda>k. t k \<star>\<^sub>M (g k)) (Suc n) \<and> g (Suc n) = f j \<and> t (Suc n) = s j \<and> bij_to g (Nset (Suc n)) H"
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subgoal_tac "(\<lambda>k. s k \<star>\<^sub>M (f k)) \<in> Nset (Suc n) \<rightarrow> carrier M")
apply (subgoal_tac "transpos j (Suc n) \<in> Nset (Suc n) \<rightarrow> Nset (Suc n)")
apply (subgoal_tac "inj_on (transpos j (Suc n)) (Nset (Suc n))")
apply (frule_tac f1 = "\<lambda>k. s k \<star>\<^sub>M (f k)" and n1 = n and h1 = "transpos j (Suc n)" in addition2 [THEN sym, of "M"], assumption+)
apply (simp del:eSum_Suc)
prefer 2 apply (rule transpos_inj, assumption+) apply (simp add:Nset_def)
apply assumption+
prefer 2 apply (rule transpos_hom, assumption+) apply (simp add:Nset_def)
apply assumption+
prefer 2 apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+) apply (simp add:funcset_mem ideal_subset)
apply (simp add:funcset_mem subsetD)
apply (subgoal_tac "cmp s (transpos j (Suc n)) \<in> Nset (Suc n) \<rightarrow> A")
apply (subgoal_tac "cmp f (transpos j (Suc n)) \<in> Nset (Suc n) \<rightarrow> H")
apply (subgoal_tac "e\<Sigma> M (cmp (\<lambda>k. s k \<star>\<^sub>M (f k)) (transpos j (Suc n))) (Suc n) =e\<Sigma> M (\<lambda>k. (cmp s (transpos j (Suc n))) k \<star>\<^sub>M ((cmp f (transpos j (Suc n))) k)) (Suc n)")
apply (simp del:eSum_Suc)
apply (subgoal_tac "bij_to (cmp f (transpos j (Suc n))) (Nset (Suc n)) H")
apply (subgoal_tac "(cmp f (transpos j (Suc n))) (Suc n) = f j")
apply (subgoal_tac "(cmp s (transpos j (Suc n))) (Suc n) = s j")
apply blast
apply (simp add:cmp_def)
apply (subst transpos_ij_2, assumption+) apply (simp add:Nset_def)
apply assumption apply simp
apply (simp add:cmp_def)
apply (subst transpos_ij_2, assumption+) apply (simp add:Nset_def)
apply assumption apply simp
prefer 2
apply (rule eSum_eq) apply (simp add:module_is_ag)
apply (rule_tac f = "transpos j (Suc n)" and A = "Nset (Suc n)" and
B = "Nset (Suc n)" and g = "\<lambda>k. s k \<star>\<^sub>M (f k)" in cmp_fun, assumption+)
apply (rule univar_func_test) apply (rule ballI)
apply (simp add:cmp_def)
apply (frule_tac x = x in funcset_mem [of "transpos j (Suc n)"
"Nset (Suc n)" "Nset (Suc n)"], assumption+)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset) apply (simp add:funcset_mem subsetD)
apply (rule ballI)
apply (simp add:cmp_def)
prefer 2 apply (simp add:cmp_fun)
prefer 2 apply (simp add:cmp_fun)
apply (thin_tac "e\<Sigma> M (\<lambda>k. s k \<star>\<^sub>M (f k)) (Suc n) = e\<Sigma> M (\<lambda>k. (cmp s (transpos j (Suc n))) k \<star>\<^sub>M ((cmp f (transpos j (Suc n)) k))) (Suc n)")
apply (thin_tac " e\<Sigma> M (cmp (\<lambda>k. s k \<star>\<^sub>M (f k)) (transpos j (Suc n))) (Suc n) = e\<Sigma> M (\<lambda>k. (cmp s (transpos j (Suc n))) k \<star>\<^sub>M ((cmp f (transpos j (Suc n)) k))) (Suc n)")
apply (simp add:bij_to_def)
apply (simp add:cmp_inj)
apply (rule cmp_surj, assumption+)
apply (rule transpos_surjec, assumption+) apply (simp add:Nset_def)
apply assumption+ apply simp
done
lemma finite_lin_spanTr1:"\<lbrakk>ring R; R module M; ideal R A; z \<in> carrier M\<rbrakk> \<Longrightarrow>
h \<in> Nset n \<rightarrow> {z} \<and> t \<in> Nset n \<rightarrow> A \<longrightarrow> (\<exists>s\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) n = s 0 \<star>\<^sub>M z)"
apply (induct_tac n)
apply (rule impI)
apply (erule conjE)+ apply (simp add:Nset_def)
apply (subgoal_tac "(0::nat) \<in> {0}")
apply (frule_tac f = h and A = "{0}" and B = "{z}" and x = 0 in funcset_mem)
apply assumption apply simp apply blast apply simp
apply (rule impI) apply (erule conjE)+
apply (frule func_pre [of _ _ "{z}"])
apply (frule func_pre [of _ _ "A"])
apply (subgoal_tac "\<exists>s\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) n = s 0 \<star>\<^sub>M z")
prefer 2 apply simp
apply (subgoal_tac "\<forall>r\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) n = r 0 \<star>\<^sub>M z \<longrightarrow>
(\<exists>s\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) (Suc n) = s 0 \<star>\<^sub>M z)")
apply blast apply (thin_tac "\<exists>s\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) n = s 0 \<star>\<^sub>M z")
apply (rule ballI) apply (rule impI) apply simp
apply (frule_tac f = h and A = "Nset (Suc n)" and B = "{z}" and x = "Suc n" in funcset_mem) apply (simp add:Nset_def) apply simp
apply (subst sprod_distrib1 [THEN sym], assumption+)
apply (subgoal_tac "0 \<in> Nset 0") apply (simp add:funcset_mem ideal_subset)
apply (simp add:Nset_def) apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem ideal_subset) apply (simp add:Nset_def)
apply assumption
apply (subgoal_tac "(\<lambda>l\<in>Nset 0. (r 0 +\<^sub>R (t (Suc n)))) \<in> Nset 0 \<rightarrow> A")
apply (subgoal_tac "( r 0 +\<^sub>R (t (Suc n))) \<star>\<^sub>M z = (\<lambda>l\<in>Nset 0. (r 0 +\<^sub>R (t (Suc n)))) 0 \<star>\<^sub>M z") apply blast
apply (subgoal_tac "0 \<in> Nset 0")
apply simp apply (simp add:Nset_def)
apply (rule univar_func_test) apply (rule ballI) apply simp
apply (rule ideal_pOp_closed, assumption+)
apply (subgoal_tac "0 \<in> Nset 0")
apply (simp add:funcset_mem) apply (simp add:Nset_def)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem) apply (simp add:Nset_def)
done
lemma single_span:"\<lbrakk>ring R; R module M; ideal R A; z \<in> carrier M;
h \<in> Nset n \<rightarrow> {z}; t \<in> Nset n \<rightarrow> A\<rbrakk> \<Longrightarrow> \<exists>s\<in>Nset 0 \<rightarrow> A. e\<Sigma> M (\<lambda>j. t j \<star>\<^sub>M (h j)) n = s 0 \<star>\<^sub>M z"
apply (simp add:finite_lin_spanTr1)
done
lemma finite_lin_spanTr2:"\<lbrakk>ring R; R module M; ideal R A; \<forall>m. (\<exists>na. \<exists>f\<in>Nset na \<rightarrow> h ` Nset n. \<exists>s\<in>Nset na \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na) \<longrightarrow> (\<exists>s\<in>Nset n \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (h j)) n); h \<in> Nset (Suc n) \<rightarrow> carrier M; f \<in> Nset na \<rightarrow> h ` Nset n; s \<in> Nset na \<rightarrow> A; m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na \<rbrakk> \<Longrightarrow> \<exists>sa\<in>Nset (Suc n) \<rightarrow> A. e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na = e\<Sigma> M (\<lambda>j. sa j \<star>\<^sub>M (h j)) n +\<^sub>M (sa (Suc n) \<star>\<^sub>M (h (Suc n)))"
apply (subgoal_tac "\<exists>l\<in>Nset n \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n")
prefer 2
apply (thin_tac "h \<in> Nset (Suc n) \<rightarrow> carrier M")
apply blast
apply (thin_tac " \<forall>m. (\<exists>na. \<exists>f\<in>Nset na \<rightarrow> h ` Nset n.
\<exists>s\<in>Nset na \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na) \<longrightarrow>
(\<exists>s\<in>Nset n \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (h j)) n)")
apply (subgoal_tac "\<forall>l\<in>Nset n \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n \<longrightarrow> (\<exists>sa\<in>Nset (Suc n) \<rightarrow> A. e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na = e\<Sigma> M (\<lambda>j. sa j \<star>\<^sub>M (h j)) n +\<^sub>M (sa (Suc n) \<star>\<^sub>M (h (Suc n))))")
apply blast
apply (thin_tac "\<exists>l\<in>Nset n \<rightarrow> A. m = e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n")
apply (rule ballI) apply (rule impI)
apply (frule sym) apply (thin_tac "m = e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na")
apply simp
apply (thin_tac "m = e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n")
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na = e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n")
apply (subgoal_tac "jointfun n l 0 (\<lambda>x\<in>Nset 0. (0\<^sub>R)) \<in> Nset (Suc n) \<rightarrow> A")
apply (subgoal_tac " e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n =
e\<Sigma> M (\<lambda>j. (jointfun n l 0 (\<lambda>x\<in>Nset 0. (0\<^sub>R))) j \<star>\<^sub>M (h j)) n +\<^sub>M ((jointfun n l 0 (\<lambda>x\<in>Nset 0. (0\<^sub>R))) (Suc n)) \<star>\<^sub>M (h (Suc n))")
apply blast
apply (subgoal_tac "jointfun n l 0 (\<lambda>x\<in>Nset 0. 0\<^sub>R) (Suc n) \<star>\<^sub>M (h (Suc n)) =
0\<^sub>M") apply simp
apply (subgoal_tac "e\<Sigma> M (\<lambda>j. jointfun n l 0 (\<lambda>x\<in>Nset 0. 0\<^sub>R) j \<star>\<^sub>M (h j)) n =
e\<Sigma> M (\<lambda>j. l j \<star>\<^sub>M (h j)) n ") apply simp
apply (frule module_is_ag [of "R" "M"], assumption+)
apply (subst ag_r_zero, assumption+)
apply (subgoal_tac "(\<lambda>j. l j \<star>\<^sub>M (h j)) \<in> Nset n \<rightarrow> carrier M")
apply (rule eSum_mem, assumption+) apply (simp add:n_in_Nsetn)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (frule func_pre [of "h" _ "carrier M"])
apply (simp add:funcset_mem) apply simp
apply (rule eSum_eq)
apply (rule module_is_ag [of "R" "M"], assumption+)
apply (rule univar_func_test)
apply (rule ballI)
apply (frule_tac x = x and n = n in Nset_le)
apply (insert Nset_nonempty[of "0"])
apply (simp add:jointfun_def)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (frule func_pre [of "h" _ "carrier M"])
apply (simp add:funcset_mem)
apply (rule univar_func_test) apply (rule ballI)
apply (rule sprod_mem, assumption+)
apply (simp add:funcset_mem ideal_subset)
apply (frule func_pre [of "h" _ "carrier M"])
apply (simp add:funcset_mem)
apply (rule ballI)
apply (frule_tac x = la and n = n in Nset_le)
apply (simp add:jointfun_def)
apply (subgoal_tac "0 \<in> Nset 0")
apply (simp add:jointfun_def sliden_def slide_def)
apply (rule sprod_0_m, assumption+)
apply (subgoal_tac "Suc n \<in> Nset (Suc n)")
apply (simp add:funcset_mem) apply (simp add:n_in_Nsetn)+
apply (frule_tac f = l and n = n and A = A and g = "\<lambda>x\<in>Nset 0. 0\<^sub>R" and m = 0
and B = A in jointfun_hom0)
apply (rule univar_func_test) apply (rule ballI) apply (simp add:Nset_def)
apply (simp add:ideal_zero) apply simp
done (** koko **)
constdefs
coeff_at_k::"[('r, 'm) RingType_scheme, 'r, nat] \<Rightarrow> (nat \<Rightarrow> 'r)"
"coeff_at_k R a k == \<lambda>j. if j = k then a else (0\<^sub>R)"
lemma card_Nset_im:"\<lbrakk>f \<in> Nset n \<rightarrow> A\<rbrakk> \<Longrightarrow> Suc 0 \<le> card (f ` Nset n)"
apply (subgoal_tac "0 < card (f ` Nset n)")
apply simp
apply (rule nonempty_card_pos)
apply (rule finite_imageI) apply (simp add:finite_Nset)
apply (subgoal_tac "f 0 \<in> f ` Nset n") apply (rule nonempty, assumption+)
apply (rule mem_in_image, assumption+) apply (simp add:Nset_def)
done
lemma eSum_changeTr1:"\<lbrakk>ring R; R module M; ideal R A; t \<in> Nset (card (f ` Nset na) - Suc 0) \<rightarrow> A; g \<in> Nset (card (f ` Nset na) - Suc 0) \<rightarrow> f ` Nset na; Suc 0 < card (f ` Nset na); g x = h (Suc n); x = Suc n; card (f ` Nset na) - Suc 0 = Suc (card (f ` Nset na) - Suc 0 - Suc 0)\<rbrakk> \<Longrightarrow> e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset na) - Suc 0) = e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset na) - Suc 0 - Suc 0) +\<^sub>M (t (Suc (card (f ` Nset na) - Suc 0 - Suc 0)) \<star>\<^sub>M (g ( Suc (card (f ` Nset na) - Suc 0 - Suc 0))))"
apply simp
done
constdefs
zeroi::"[('r, 'm) RingType_scheme] \<Rightarrow> nat \<Rightarrow> 'r"
"zeroi R == \<lambda>j. 0\<^sub>R"
lemma prep_arrTr1:"\<lbrakk>ring R; R module M; ideal R A; h \<in> Nset (Suc n) \<rightarrow> carrier M; f\<in>Nset na \<rightarrow> h ` Nset (Suc n); s\<in>Nset na \<rightarrow> A; m = linear_combination R M na s f\<rbrakk> \<Longrightarrow> \<exists>l\<in>Nset (Suc n). (\<exists>s\<in>Nset l \<rightarrow> A. \<exists>g\<in> Nset l \<rightarrow> h ` Nset (Suc n). m = linear_combination R M l s g \<and> bij_to g (Nset l) (f ` Nset na))"
apply (frule_tac s = s and n = na and f = f in same_together[of "R" "A" "M" " h ` Nset (Suc n)"], assumption+)
apply (simp add:image_sub) apply assumption+
apply auto
apply (simp add:linear_combination_def)
apply (thin_tac "e\<Sigma> M (\<lambda>j. s j \<star>\<^sub>M (f j)) na =
e\<Sigma> M (\<lambda>k. t k \<star>\<^sub>M (g k)) (card (f ` Nset na) - Suc 0)")
apply (subgoal_tac "(card (f ` Nset na) - Suc 0) \<in> Nset (Suc n)")
apply (subgoal_tac "g \<in> Nset (card (f ` Nset na) - Suc 0) \<rightarrow> h ` Nset (Suc n)")
apply (subgoal_tac "bij_to g (Nset (card (f ` Nset na) - Suc 0)) (f ` Nset na)")
apply blast
prefer 2
apply (frule_tac f = f and A = "Nset na" and B = "h ` Nset (Suc n)" and
?A1.0 = "Nset na" in image_sub) apply simp
apply (rule extend_fun, assumption+)
apply (frule_tac f = f and A = "Nset na" and B = "h ` Nset (Suc n)" and
?A1.0 = "Nset na" in image_sub) apply simp
apply (simp add:bij_to_def)
apply (rule_tac A = "f ` Nset na" and n = "card (f ` Nset na) - Suc 0" and f = g in Nset2finite_inj)
apply (rule finite_imageI) apply (simp add:finite_Nset)
apply (frule_tac f = f and n = na and A = "h ` Nset (Suc n)" in card_Nset_im)
apply simp apply assumption
apply (subgoal_tac "finite (h ` Nset (Suc n))")
apply (frule_tac f = f and A = "Nset na" and B = "h ` Nset (Suc n)" and
?A1.0 = "Nset na" in image_sub) apply simp
apply (frule_tac B = "h ` Nset (Suc n)" and A = "f ` Nset na" in card_mono,
assumption+)
apply (insert finite_Nset [of "Suc n"])
apply (frule card_image_le [of "Nset (Suc n)" "h"])
apply (frule_tac i = "card (f ` Nset na)" and j = "card (h ` Nset (Suc n))"
and k = "card (Nset (Suc n))" in le_trans, assumption+)
apply (simp add:card_Nset[of "Suc n"])
apply (frule_tac i = "card (f ` Nset na)" and j = "card (h ` Nset (Suc n))"
and k = "Suc (Suc n)" in le_trans, assumption+)
apply (frule_tac m = "card (f ` Nset na)" and n = "Suc (Suc n)" and l = "Suc 0" in diff_le_mono)
apply (simp add:Nset_def)
apply (rule finite_imageI) apply (simp add:finite_Nset)
done
lemma finite_lin_spanTr3:"\<lbrakk>ring R; R module M; ideal R A\<rbrakk> \<Longrightarrow> h\<in>Nset n \<rightarrow> carrier M \<longrightarrow> (\<forall>na. \<forall>s \<in> Nset na \<rightarrow> A. \<forall>f\<in>Nset na \<rightarrow> (h ` (Nset n)). (\<exists>t \<in> Nset n \<rightarrow> A. linear_combination R M na s f = linear_combination R M n t h))"
apply (induct_tac n)
apply (rule impI) apply (rule allI) apply (rule ballI)+
apply (insert Nset_nonempty [of "0"])
apply (simp add:linear_combination_def)