
182 N.W.2d 834 (1970)
John V. HOENE, and Duininck Bros. & Gilchrist, a partnership, Appellants,
v.
John R. JAMIESON, State Commissioner of Highways of the State of Minnesota, et al., Respondents.
No. 41642.
Supreme Court of Minnesota.
December 11, 1970.
Rehearing Denied January 21, 1971.
*835 Stearns, Torrison, Goetteman & Driscoll, St. Paul, Gordon Rosenmeier and John E. Simonett, Little Falls, for appellants.
Douglas M. Head, Atty. Gen., Norman R. Carpenter, Deputy Atty. Gen., Will H. Hartfeldt, Asst. Atty. Gen., St. Paul, C. Hamilton Luther, Deputy Atty. Gen., Dept. of Taxation, St. Paul, for respondents.
Cant, Haverstock, Gray, Plant & Mooty and Kenneth M. Anderson and John M. Broeker, Minneapolis, amicus curiae.

OPINION
OTIS, Justice.
This is an action for a declaratory judgment which seeks a determination that Minn.St. 297A.25, subd. 4, permitting a sales tax on road-building materials purchased by contractors, is unconstitutional. The trial court upheld the statute and plaintiffs appealed. In an opinion filed October 3, 1969, we reversed and held the statute unconstitutional. Defendants sought and obtained a rehearing. They were joined in their petition by Minnesota Association of Commerce and Industry and Minnesota Taxpayers Association as amici curiae who were permitted to file briefs and present oral argument.
The matter now having been exhaustively briefed and reargued, upon reconsideration we hold the statute constitutional as to purchases by contractors but unconstitutional as to direct purchases by the state. Our prior opinion is therefore withdrawn.
Ex.Sess.L.1967, c. 32, was enacted as the "Tax Reform and Relief Act of 1967." The effect of the act was to impose a 3-percent sales tax on sales at retail. The section with which we are concerned is § 297A.25 which deals with exemptions. Subdivision 1(h) of that section specifically exempts from the tax the gross receipts from the sale of all materials used or consumed in industrial production of personal property intended to be sold ultimately at retail, including the production *836 of road-building material.[1] Minn.St. 297 A.25 provides in part:
"Subdivision 1. The following are specifically exempted from the taxes imposed by sections 297A.01 to 297A.44:
* * * * * *
"(j) The gross receipts from all sales of tangible personal property to, and all storage, use or consumption of such property by, the United States and its agencies and instrumentalities or the state of Minnesota and its agencies, instrumentalities and political subdivisions."
Section 297A.25, subd. 4, which is the provision challenged in these proceedings, was drafted by a conference committee of the House and Senate at the 1967 Extra Session. It excludes certain sales from the exemptions otherwise conferred by the sections cited, in the following language:
"Nothing herein shall exempt the gross receipts from sales of road building materials intended for use in state trunk highway or interstate highway construction, whether purchased by the state or its contractors."
The basic issue is whether the imposition of a sales tax on materials purchased by contractors for use in state trunk highway or interstate highway construction unconstitutionally invades the state trunk highway fund created by Minn.Const. art. 16, § 6, expenditures from which are limited to trunk highway purposes. In resolving the constitutional question, other issues arise. First, is the court bound by a stipulation that § 297A.25, subd. 4, "is a severable provision in its entirety but not severable within itself"? Is there before us a justiciable issue as to the validity of the sales tax on purchases of road-building material made directly by the state? Do plaintiffs have standing to raise this constitutional question with respect to purchases by the state? Is the stipulation one of fact designed to obviate proof which would otherwise be presented by the testimony of witnesses? Does the stipulation bear only on the question of legislative intent, or does it purport to resolve between the parties a constitutional issue which is the exclusive prerogative of the court to determine? Is the inclusion of an anticipated sales tax on road-building material, as an item of expense in arriving at competitive bids for contracts with the state, to be presumed by the court? If so, do contracts which have included the sales tax as a cost of doing business pro tanto constitute an unconstitutional diversion from the trunk highway fund to the property tax relief fund created by Ex. Sess.L.1967, c. 32?
Plaintiff John V. Hoene is executive vice president of Minnesota Asphalt Pavement Association and sues as a taxpayer concerned with preserving the state trunk highway fund. Plaintiff Duininck Bros. & Gilchrist is a partnership which is engaged in highway construction. Its compensation is paid to a substantial extent *837 from the state trunk highway fund. Plaintiffs allege that the sales tax imposed on direct purchases by the state and the inclusion of the tax in arriving at competitive bidding by contractors depletes the trunk highway fund. They assert they are thereby aggrieved because the result will substantially impair highway construction, violates the constitutional protection against diversions for other than highway purposes, and reduces the amount of work available to them. Defendants are the commissioner of highways, commissioner of taxation, and state auditor. They deny the sales tax diminishes the amount available for highway construction any more than any other tax which increases the cost of doing business. They further deny that the state assumes any sales tax by contracting for highway construction or that § 297A.25, subd. 4, is unconstitutional, but admit that it is severable from the remainder of the chapter if held unconstitutional.
In addition to the stipulation that subd. 4 is severable in its entirety but not severable within itself, the parties agreed as follows: That from 1968 to 1972 Minnesota would spend $742,000,000 on trunk and interstate highways; that money for this program will come from the trunk highway fund created by Minn.Const. art. 16; that neither the use of road-building materials by contractors nor the acceptance by the state of a highway project constitutes a retail sale between the contractor and the state; that the purchase of road-building materials by the contractor from his supplier is subject to a sales tax payable by the contractor; that the anticipated purchases of highway material by the state, ranging from $1,800,000 to $8,000,000 annually, will be subject to a 3-percent sales tax imposed on the supplier; and that road-building materials purchased either by the state or its contractors for use in trunk or interstate highway construction is made subject to a sales tax by subd. 4.
1. As we construe the so-called Tax Reform and Relief Act, § 297A.25, subd. 1(h), defers the imposition of a sales tax on the ingredients used in producing road-building material until the manufacturer or supplier sells such materials to a highway contractor or directly to the state. Section 297A.25, subd. 1(j), exempts sales of tangible property to the United States and to the State of Minnesota. Subd. 4 then limits exemptions conferred by par. (j) to sales other than those intended for use in state trunk highway or interstate highway construction as far as the State of Minnesota is concerned.[2] Apparently there is no exemption elsewhere conferred with respect to purchases by contractors. To that extent, the application of § 297A.25, subd. 4, to contractors appears to be superfluous.
The thrust of plaintiffs' position is this: "A sales tax on direct purchases of road-building material by the State of Minnesota is an unconstitutional diversion to the property tax relief fund of trunk highway funds protected by Minn.Const. art. 16. By stipulation, subd. 4 is not severable within itself. Therefore, the tax is also unconstitutional as to purchases by contractors."
Although the parties have stipulated that suppliers of highway materials will collect a 3-percent sales tax from the state on any purchases made by it, none of the parties, including the commissioner of taxation, attempts to defend the constitutionality of the tax so far as direct purchases by the state are concerned. For purposes of this litigation, the parties assume that such a tax on the state is invalid. The real issue then is whether we are bound by the stipulation with respect to severability. We have concluded that we are not.
*838 Plaintiffs argue with considerable force that the stipulation is not one of governing law but merely a stipulation of fact designed to obviate the necessity for introducing testimony. They assert that they were prepared to prove the "economic chaos" which would result if the tax applied only to contractors. The inevitable consequence, they allege, would be the undertaking of much of the highway construction in Minnesota by the state itself in order to reduce the cost by eliminating the sales tax. In addition, plaintiffs assert that the stipulation is one of fact relative to legislative intent. Although these arguments are ingenious, we are persuaded that the question of severability is one of law. In a matter of such great public moment, we have concluded not to be bound by the terms of the stipulation.
"* * * While stipulations which affect only the individual rights of the parties thereto may be given effect, stipulations in respect to matters of law, especially if they affect public interests, are not binding upon and will be disregarded by the courts." City of St. Paul v. Chicago, St. P. M. & O. Ry. Co., 139 Minn. 322, 328, 166 N.W. 335, 337.
To the same effect is Tynan v. KSTP, Inc., 247 Minn. 168, 176, 77 N.W.2d 200, 205.
As we have indicated, subd. 4 appears to have been an afterthought designed to take advantage of the Federal Government's major participation in the construction of trunk and interstate highways. Section 297A.25, subd. 1(j), expressly exempts from the sales tax purchases of personal property by the United States Government and by the State of Minnesota. That provision is clearly consistent with the immunity which state and Federal governments ordinarily enjoy. We perceive no legislative intent to apply the exemption or nonexemption equally to contractors and to the state in other kinds of highway construction. As we have suggested, but for subd. 4, it would appear that purchases by the state would be exempt and purchases by the contractors would be subject to the tax. We therefore hold the application of the statute with respect to contractors and the state is severable as a matter of law.
2. Courts do not lightly set aside legislation as unconstitutional. Section 297A.25, subd. 4, enjoys a presumption of constitutionality, and the burden is on plaintiffs to prove beyond a reasonable doubt that it is invalid.
"* * * The power of the court to declare a law unconstitutional is to be exercised only when absolutely necessary in the particular case and then with great caution." Minneapolis Gas. Co. v. Zimmerman, 253 Minn. 164, 173, 91 N.W.2d 642, 650.
Heretofore, in a number of cases we have held statutes valid which have invaded the trunk highway fund for purposes other than actual highway construction. In State ex rel. Holm v. King, 184 Minn. 250, 238 N.W. 334, we upheld a statute appropriating from the trunk highway fund the cost of collecting fees for issuing motor vehicle licenses. This, we said, was a trunk highway purpose. Again, in Cory v. King, 214 Minn. 535, 8 N.W.2d 614; Cory v. King, 227 Minn. 551, 35 N.W.2d 807; and Minneapolis Gas Co. v. Zimmerman, supra, we found a legitimate highway purpose in defraying the costs incurred by various state agencies which maintained accounts and records pertaining to trunk highways; in collecting gasoline taxes which were paid into the trunk highway fund; and in relocating public utilities on trunk highways. However, in Cory v. King, 209 Minn. 431, 296 N.W. 506, an attempt to assess an arbitrary amount against the fund to defray the expenses of various executive departments was held to be unjustified by the facts and not devoted to a use solely for highway purposes.
A long line of decisions dealing with the impact on government immunity of *839 taxes paid by contractors suggests there is no reason to hold as a matter of law that this sales tax as to contractors unlawfully invades the state trunk highway fund. Although there may be somewhat greater flexibility in accepting or resisting threats to Federal immunity, the United States Supreme Court has discussed the question of taxes on contractors doing business with the government in language applicable to the issues here before us. In James v. Dravo Contracting Co., 302 U.S. 134, 58 S.Ct. 208, 82 L.Ed. 155, the question was whether a West Virginia gross receipts tax assessed against a contractor building locks and dams for the United States Government was an invalid burden on the Federal government. The court held it was not. In so holding, the court said among other things (302 U.S. 158, 58 S.Ct. 220, 82 L.Ed. 171):
"* * * The defense is that the tax burdens the government, and respondent's right is at best a derivative one. He asserts an immunity which, if it exists, pertains to the government and which the government disclaims."
To the extent that plaintiffs in the instant case seek to divest themselves of a tax because it impinges on the state's rights, it is doubtful whether they have standing. In the James case the court stated that the tax was not invalid merely because it increased the contractor's cost of doing business and thereby increased the cost to the government. Where the burden is consequential and remote rather than immediate or direct, it will be sustained. A similar claim of immunity with respect to a state tax on gasoline used by contractors building levees for the Federal Government was rejected in Trinityfarm Const. Co. v. Grosjean, 291 U.S. 466, 54 S.Ct. 469, 78 L.Ed. 918. Again, in Alabama v. King & Boozer, 314 U.S. 1, 62 S.Ct. 43, 86 L.Ed. 3, 140 A.L.R. 615, and Curry v. United States, 314 U.S. 14, 62 S.Ct. 48, 86 L.Ed. 9, the court treated as valid state taxes initially paid by contractors who were reimbursed by the Federal Government under cost-plus contracts, notwithstanding the economic burden was passed on to the government. The Utah Supreme Court came to a similar conclusion with respect to a state sales tax in Utah Concrete Products Corp. v. State Tax Comm., 101 Utah 513, 125 P.2d 408. A use tax was involved in United States v. Boyd, 378 U.S. 39, 84 S.Ct. 1518, 12 L.Ed. 2d 713, where the Supreme Court found no impermissible burden in Tennessee's tax on contractors doing business with the Atomic Energy Commission.
It is obvious that all taxes which road contractors assume must be anticipated and included in contracts for highway construction entered with the State of Minnesota. The imposition of a sales tax is on the same footing as real and personal property taxes, unemployment compensation taxes, and income taxes which contractors must also bear. These are costs of doing business which vary from bid to bid and from contractor to contractor. The sales tax on purchases of highway material does not appear separately in the bid and in no event is it collected from the state by the contractor. It is clear that there is considerable disparity in the methods by which highway contractors do business. Many of them extract and prepare their own materials for use in highway construction. As to them the sales tax may be minimal. Each contractor will decide for himself the extent to which he may assume part or all of the sales tax. The amount of profit which contractors hope to realize will necessarily vary according to the circumstances and economic necessities which influence their bids. While it is inevitable that a part or all of the sales tax paid by a contractor will be reflected in his bid, we are satisfied that it is not such a direct and immediate invasion of the trunk highway fund as to be invalid. We therefore hold Minn.St. 297A.25, subd. 4, constitutional as to contractors.
3. As we have indicated, all of the parties assume that the tax is invalid as *840 to purchases by the state. In this assumption, we concur. Clearly, the imposition of a 3-percent sales tax on direct purchases diverts that amount from the trunk highway fund to the property tax relief fund. The precise amount of the tax is mathematically ascertainable in every instance. We have no difficulty, therefore, in holding the tax unconstitutional as to purchases made directly by the state.
Affirmed in part and reversed in part.
The opinion filed herein on October 3, 1969, is hereby withdrawn and the above opinion substituted in its place.
KELLY, J., not having been a member of this court at the time of the argument and submission, took no part in the consideration or decision of this case.
NOTES
[1]  The precise language of Minn.St. 297A.25, subd. 1(h), is as follows: "The gross receipts from the sale of and the storage, use, or consumption of all materials, including chemicals, fuels, petroleum products, lubricants, packaging materials, feeds, seeds, fertilizers, electricity, gas and steam, used or consumed in agricultural or industrial production of personal property intended to be sold ultimately at retail, whether or not the item so used becomes an ingredient or constituent part of the property produced. Such production shall include, but is not limited to, production of any tangible personal property, manufacturing, processing (other than by restaurants and consumers) of agricultural products whether vegetable or animal, commercial fishing, refining, smelting, reducing, brewing, distilling, printing, mining, quarrying, lumbering, generating electricity and road building. Such production shall not include painting, cleaning, repairing or similar processing of property except as part of the original manufacturing process. Machinery, equipment, implements, tools, accessories, appliances, contrivances, furniture and fixtures used in such production and fuel, electricity, gas or steam used for space heating or lighting, are not included within this exemption."
[2]  The imposition of the tax on purchases for trunk and interstate highway construction apparently stems from the fact that the Federal Government assumes most of the cost of such construction. This also seems to be the reason the commissioner of highways does not object to an invasion of the trunk highway fund.
