## 4 Conclusions  
Safety indicators, many examples of which are described in the literature, usually include primarily measures related to accessibility, availability, acceptability, and affordability (4A). However, most of them do not cover the impact of REE demand on safety. Various methods were also used to determine the metrics, such as z-score, min-max, and taxonomic methods. The measure proposed by the authors is based on fuzzy sets. This method makes it possible to take into account the qualitative factor (legal factors) and the impact of the demand for REEs on the level of Poland's energy security index during the analysis. Fuzzy sets not only provide an answer to the size of the _SEM_ index, but also make it possible to build three scenarios of energy security depending on the selected explanatory variables. Such scenarios can be extremely valuable during the process of planning a country's energy strategy. The fuzzy model can be used to determine scenarios of the impact of changes in demand for primary energy and rare earth elements on Poland's energy security in the situation of changing legal regulations in this area. Scenarios can be excellent guidelines for decision makers in determining the country's energy strategy. The universality of the proposed solution allows for the assessment of energy security on a smaller scale, relating to a specific organization, e.g., a plant or a company. In the future, it is planned to further expand the fuzzy model to include other factors that affect the energy security of the organization or Poland, including those resulting from cyberattacks on critical infrastructure. The conducted research allowed us to find answers to the research questions:  
1. What is the relationship between access to critical raw materials and energy availability? The basic strategic document shaping the energy system in Poland is the Polish Energy Policy until 2040. In addition to PEP2040, the National Energy and Climate Plan for 2021-2030 also has an impact on the energy system. Both documents place great emphasis on the development of renewable energy. The policy states that by 2040, the share of renewable energy sources in electricity production should be 50%. This production will be based mainly on wind and solar energy. It is assumed that in addition to onshore wind farms, offshore wind farms will also be built in Poland, and by 2040 they will reach an installed capacity of 11 GW. Both documents contain information on access to critical raw materials, but in the authors' opinion, they are negligible, especially considering the importance of critical raw materials in the development of renewable energy sources. In the presented research, the authors focused on REEs, without which it will be impossible to carry out an energy transformation based on wind energy. REEs are also of great importance for the development of electromobility and energy storage, without which the development of photovoltaics in the future may be unjustified. 2. How will energy policy regarding renewable energy sources and critical raw materials affect energy security? As shown by the presented research results, in conditions of high demand for REEs and energy ultimately coming from renewable energy sources, the energy security index may, in extreme cases, have the lowest value of 0%. Such a scenario concerns neutral conditions of the political environment, assuming that the development of RESs and ensuring access to REEs will not be stimulated by the state, but that it will not block the development of RESs, as, e.g., in the case of wind energy (Wind Act of 16 July 2016). The lowest level of energy security in the range of 80-0% would be achieved under unfavorable legislative conditions. If, in addition, the demand for energy and REEs is significant, the energy security index may drop to 0. 3. What strategies should be implemented in the context of dependence on critical raw materials to improve energy security? It is necessary to develop an additional policy to ensure access to critical raw materials.